views:

120

answers:

4

When I concatenate the following two unicode characters I see both but there is a space between them. Is there anyway to get rid of this space?

 StringBuilder  sb = new StringBuilder();
 int characterCode;
 characterCode = Convert.ToInt32("2758", 16);
 sb.Append((char)characterCode);
 characterCode = Convert.ToInt32("25c4", 16);
 sb.Append((char)characterCode);
+4  A: 

If you examine sb, you will see that it has Length of 2. There is no space between the characters.



I think the issue is that you wish the "on" pixels of the 2 characters were closer to each other so the 2 "characters" look more "next to" each other, no?

Edit: Like you said, you can see if those 2 characters look any "closer" to each other in a different font.

JeffH
You are correct, yes I would like them to appear closer together.But I guess it is just a font issue.
OutOFTouch
+1  A: 

Would not

  var str = "\x2758\x25c4"

work?

James Curran
While this is the "right" way, it doesn't address the OP's original issue that the two specific characters appear too far apart.
JeffH
+1  A: 

There's no space, it's an artifact of your display font.

Seva Alekseyev
+1  A: 

Character U+2758 looks very wide in MS Gothic, but it's narrow in Arial Unicode MS. Try changing your font.

Jeffrey L Whitledge