By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,939 Members | 1,602 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,939 IT Pros & Developers. It's quick & easy.

Problem displaying Unicode characters on my forms labels and butto

P: n/a
I am having a problem displaying Unicode characters on my Forms labels and
buttons. After coding Button1.Text = unicode; where the unicode is a Unicode
character or string (‘\u1234’ or “\u1234”) It seems to work the first time I
set the button to the Unicode character. After a while, when saving my code,
I get a pop-up window stating that I need to save the file as a Unicode else
my changes will not be saved.

Seance I do not want to save my file as Unicode, because it does not make
any séance for me to save my code file as a Unicode extension. I don’t even
have that extension available and even if I do I don’t think my code will
compile any more.
So when I close visual studio and reopen it, my changes (the line of code:
Button1.Text = Unicode) has been deleted. But if I have Button.Text =
Sometimes it will be replaced by a ? inside the double quote and when running
the program it will display ?.

What change do I need to make so that Button.Text is set to the Unicode
character and will not be deleted if I reload visual studio?

Kidus.

Nov 17 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In my test VS.NET has not said anything about saving as Unicode and it works
fine, but if VS.NET warns you about saving as unicode, you should do it, at
least for a test. Also, take a look at the File\Advanced Save Options dialog
to select manually the codepage.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com

"Kidus Yared" <Ki********@discussions.microsoft.com> escribi en el mensaje
news:15**********************************@microsof t.com...
I am having a problem displaying Unicode characters on my Forms labels and
buttons. After coding Button1.Text = unicode; where the unicode is a
Unicode
character or string ('\u1234' or "\u1234") It seems to work the first time
I
set the button to the Unicode character. After a while, when saving my
code,
I get a pop-up window stating that I need to save the file as a Unicode
else
my changes will not be saved.

Seance I do not want to save my file as Unicode, because it does not make
any sance for me to save my code file as a Unicode extension. I don't
even
have that extension available and even if I do I don't think my code will
compile any more.
So when I close visual studio and reopen it, my changes (the line of code:
Button1.Text = Unicode) has been deleted. But if I have Button.Text =
Sometimes it will be replaced by a ? inside the double quote and when
running
the program it will display ?.

What change do I need to make so that Button.Text is set to the Unicode
character and will not be deleted if I reload visual studio?

Kidus.

Nov 17 '05 #2

P: n/a
Kidus Yared <Ki********@discussions.microsoft.com> wrote:
I am having a problem displaying Unicode characters on my Forms labels and
buttons. After coding Button1.Text = unicode; where the unicode is a Unicode
character or string (?\u1234? or ?\u1234?) It seems to work the first time I
set the button to the Unicode character. After a while, when saving my code,
I get a pop-up window stating that I need to save the file as a Unicode else
my changes will not be saved.

Seance I do not want to save my file as Unicode, because it does not make
any s?ance for me to save my code file as a Unicode extension. I don?t even
have that extension available and even if I do I don?t think my code will
compile any more.
I don't know what you mean by "a Unicode extension" - your file will
have the same extension as before, but be stored in Unicode.
So when I close visual studio and reopen it, my changes (the line of code:
Button1.Text = Unicode) has been deleted. But if I have Button.Text =
Sometimes it will be replaced by a ? inside the double quote and when running
the program it will display ?.

What change do I need to make so that Button.Text is set to the Unicode
character and will not be deleted if I reload visual studio?


Just save the file as Unicode.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 17 '05 #3

P: n/a
> I am having a problem displaying Unicode characters on my Forms labels and
buttons. After coding Button1.Text = unicode; where the unicode is a .... What change do I need to make so that Button.Text is set to the Unicode
character and will not be deleted if I reload visual studio?


You mean you do that in the code? Sorry, this is just not the right way.
You should have no linguistic data in the code.
Store the string you want in a resource file (which is utf-8), and at runtime
load it and set the text of the button.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
------------------------------------------
Replace _year_ with _ to get the real email
Nov 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.