German Umlaute (Resources)

G

Guest

In order to have a mutli-lingual page, I load all .Text, .ToolTip etc from a
resource, if the user does not work with the default-language, like this:

Thread.CurrentThread.CurrentCulture = new CultureInfo(selCulture);
Thread.CurrentThread.CurrentUICulture = new CultureInfo(selCulture);
// overwrite Text items
lblMntlogin.Text = rm.GetString("Mntlogin.Text");
tbxMntlogin.ToolTip = rm.GetString("Mntlogin.ToolTip");
etc..

If I have german umlaute (ä,ö,ü etc) in the Resources Textfile, I found out
that I have to represent them in ansi (&228;,&246;,&252;). This works fine
for the Text Property, but it DOES NOT WORK for the ToolTip !
Does anybody know the rules behind this ?
Thanks
PS: obviousely the best solution would be to just use umlaute as is in the
textfile, without having to use the ansi representation.
 
S

Sylvain Lafontaine

&228; is for HTML, not for Javascript.

Use UTF-8 instead: look under Advanced Save Options and chose UTF-8 with
signature (Code page 65001). Save your file; close VS.NET and reopen it to
make sure that everything is now OK.

Do the same with your HTML page and always use UTF-8 as the encoding of your
page. Don't forget that even if you set the UTF-8 as the encoding in the
property of your HTML page, the file itself must be also saved on the
hard-drive with UTF-8 encoding.

S. L.
 

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

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top