Link to home
Start Free TrialLog in
Avatar of Stacie
StacieFlag for United States of America

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:
<data name="Approved" xml:space="preserve">
<value>A approuvé</value>

Open in new window



My chtml file is :
{ dataField: "FormattedApprovedDate", calculateSortValue: "ApprovedDate", dataType: "date", caption: '@(Language.Translate(Language.Keys.Approved, ViewBag))'},

Open in new window

file1.PNG
Avatar of Stacie
Stacie
Flag of United States of America image

ASKER

I believe I could use HTML.RAW on this.  Not sure what is the correct notation for this:

{ dataField: "FormattedApprovedDate", calculateSortValue: "ApprovedDate", dataType: "date", caption: '@(Language.Translate(Language.Keys.Approved, ViewBag))'},
Avatar of Stacie

ASKER

changed to this '@(Language.Translate(Language.Keys.Expires, ViewBag).html())
Avatar of sarabande
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
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members 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.