Search code examples
utf-8character-encodingxpagesturkishpolish

Translation files for Turkish language not encoded correctly


I am using translation files for translating my xpages application to turkish language. I have set the application encoding to UTF-8 (xsp.html.page.encoding=utf-8) Most of my languages is working fine but there is problem with Turkish and Polish

The problem I have is that the labels from the translation file do not display the correct encoding even though I have it set up correctly.

All content that is created on my site display correctly in turkish but not the labels from the translation files.

I have tried setting lang=tr, lang=tr-TR, added UTF-8 meta tags, and changed the property file encoding to UTF-8 but still it is not working,

Here is an example

This is Correct turkish entered into the translation file

FACEBOOK KİŞİLİĞİNİZ İLE GİRİŞ YAPIN

This is a sample what the browser outputs

FACEBOOK KÝÞÝLÝÐÝNÝZ ÝLE GÝRÝÞ YAPIN

This is my header settings

 <html lang="tr">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
 </head>

enter image description hereenter image description hereenter image description here

You can also see a live example of this problem at http://www.intrapages.com at the bottom of the login screen there is change language link, set it to turkish


Solution

  • This is a unicode issue. Designer does not convert those characters to unicode.

    You can export '.properties' file, use native2ascii command line utility to convert it to unicode values (\uXXXX format).

    Another easy option is using an online native2ascii converter. There are a couple of those I know (e.g. this and this)