Display Extended ASCII in listview

A

aagarwal8

Hi,

I want to display the extended ASCII charset in the list view (in List
mode), but when i assign any of the Ex. ASCII chars to the listview
item text, it renders blank.

Any idea how i can display the Ex ASCII chars in list view.

Regards,
Ankit!!
 
B

Bjørn Brox

(e-mail address removed) skrev:
Hi,

I want to display the extended ASCII charset in the list view (in List
mode), but when i assign any of the Ex. ASCII chars to the listview
item text, it renders blank.

Any idea how i can display the Ex ASCII chars in list view.
It should, if the strings you are feeding it is encoded as UTF8/Unicode.
Which specific characters is missing?

ListView, like all other items in C# is made for Unicode/UTF8 string
which covers most languages and character-sets.

The only limitation in displaying such text is if you are using a font
which is not covering the character range, - Tahoma is a good choice.
 
A

aagarwal8

the character i used is Alt+0172 (¬) and it doesnt show in the
listview

Regards,
Ankit!
 
J

Jon Skeet [C# MVP]

the character i used is Alt+0172 (¬) and it doesnt show in the
listview

I suggest you try to find what Unicode character it is, and then check
for fonts which support it.

Jon
 
G

Göran Andersson

the character i used is Alt+0172 (¬) and it doesnt show in the
listview

Regards,
Ankit!

Then you should check what font you are using for the listview, as that
is a unicode character. Most stanard fonts support it, even MS Serif and
MS Sans Serif.

If you have a font that supports it, then you should check if you
actually got the character into the string correctly.
 
G

Göran Andersson

Bjørn Brox said:
It should, if the strings you are feeding it is encoded as UTF8/Unicode.

Not to be picky, but this is tricky enough... :)

String are actually not encoded, they are just unicode. Internally they
are stored as 16-bit character codes (with surrogate pairs to support
the full 21 bit character range).

If you encode a string you don't have a string any more, you have a byte
array.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top