I'm having a problem working with foreign characters (well....foreign
to me anyway)
I have a textbox control on a form. The font is set to MS Arial
Unicode. If I use the Chinese input method I can type characters
into this box no problem. They display correctly. I can also copy
and paste Chinese characters from web sites into this text box and
they display no problem.
Here is my problem. If I put some Chinese characters in the box,
then run this line of code:
txtBox.Text = txtBox.Text + " WHY ARE YOU DIFFERENT?";
The original characters change to question marks (with my new text
appended correctly after them)
So my question is - who has the problem?
First thought was the text box. But it appears to support displaying
the Chinese characters OK when I type them in. Or if I copy and paste
them from a Chinese web site using the clipboard. So it's not a font
display problem.
So that means it must be something to do with the way strings are
stored in C#? But I've heard they are all unicode. So how could
this be a problem?
The line above does not do any obvious conversion. I should get the
exact same contents of the text box (with some extra text added to the
end)
Any help would be appreciated.