Stacie
asked on
Localization in french text not displaying properly. If I have a text string containing this value é in french it get converted to é
I'm working with the localization file. I get the following result when the value are displayed in my view page : A approuvé instead of A Approuvé. The issue is with the é. I have included a screen shoot. Any clue why will this happen.
And I have the following value for my french translation: lan.fr-CA.resx:
My chtml file is :
And I have the following value for my french translation: lan.fr-CA.resx:
<data name="Approved" xml:space="preserve">
<value>A approuvé</value>
My chtml file is :
{ dataField: "FormattedApprovedDate", calculateSortValue: "ApprovedDate", dataType: "date", caption: '@(Language.Translate(Language.Keys.Approved, ViewBag))'},
file1.PNG
ASKER
changed to this '@(Language.Translate(Lang uage.Keys. Expires, ViewBag).html())
the character set in the xml file most likely is UTF-8 while the character set used for é either is ANSI (8-bit) or UTF-16 (16 bit double-byte). the latter is the character set used by C# (or .NET, or Windows "UNICODE").
check the xml contents for the used character set. if you look at the file with a hex editor, you easily can see whether the 'è' is 1 byte or double byte. for any case you need conversion before writing texts with different character set to the xml.
Sara
check the xml contents for the used character set. if you look at the file with a hex editor, you easily can see whether the 'è' is 1 byte or double byte. for any case you need conversion before writing texts with different character set to the xml.
Sara
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
ASKER
{ dataField: "FormattedApprovedDate", calculateSortValue: "ApprovedDate", dataType: "date", caption: '@(Language.Translate(Lang