开发者

Japanese vs Chinese characters

In my app I'm displaying some user-provided text within a TextBlock.

We found that Chinese symbols were being displayed instead of Japanese symbols, even though all the language settings under Settings are set to Japan.

Having looked into the documentation at http://msdn.microsoft.com/en-us/library/hh202920(v=vs.92).aspx I am now setting the Language property of the RootFrame at startup like this:

开发者_StackOverflow
RootFrame.Language = XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentUICulture.Name);

Now the correct (Japanese) symbols are displayed throughout the app.

Can anyone who has traveled down this path let me know if this is the right thing to do? Is there a better way?


We have had to do this in our Silverlight application too - this was to get "StringFormat=c" to honour culture settings. We couldn't find a better way of doing this.

We found this on Tim Heuer's blog - unfortunately the site is down at the moment so I can't summarise the post here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜