I'm trying to localize a Windows 8 Metro style app as described in a guide on MSDN . This worked very well so far, but now I'm trying to localize a string containing a non-breaking space which appears in a XAML file (originally as hexadecimal xml-escaped string:  ). Just putting the above string into the Resources.resw file does not work, it appears just as  . What do I have to do to get a non-breaking space in my localizations?
�a0 is a XML character literal, which means that <foo>�a0</foo> has the inner-text equal to the string "\\x00a0".
Probably the best thing for you to do is to dynamically reference the string, and perform a replace:
var loader = new Windows.ApplicationModel.Resources.ResourceLoader();
var str = loader.GetString('Farewell');
var modstring = str.Replace("�a0", "\x00a0");
myControl.Text = modstring;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.