简体   繁体   中英

Displaying a string with special chars in xaml wp8

i´m having a trouble to display a string value, that i'm binding to a textblock, the problem is that, the string has a value like this -> Corrección and when i display that value has some strange characters, i already try to encode that string to utf-8 but the problem still there, the question is, there is some namespace that i had to incle at phone label? or there is some way to encode directly to the textblock label ? please guys need some help here.

the code is the next.

//on the cs file i have something like this

string someString= "Acción de la niñes";

and this value is binding to a textblock like this

<TextBlock Foreground="Black" Text="{Binding}" />

so the display value has strange chars at the "ó" and the "ñ"

Again i hope someone can help i will be very thankful with all of you

Your problem sounds like an encoding problem. Make sure that your files (XAML, code, resources) use a proper Unicode encoding such as UTF8.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM