• Post Reply Bookmark Topic Watch Topic
  • New Topic

Turkish Character Problem in Properties Files

 
veli akcakaya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i try to use properties files for Localization. But i have problem some Turkish charecter.

- my properties file is UTF-8
- my jsp file like this (it's a summary)
personal_opt=Kişisel Ayarlar

- and my jsf page;

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<f:view>
<f:loadBundle var="msg" basename="net.lms.messages.adminMessages" />
<hutputText value="#{msg.personal_opt}"/>
</f:view>

but i cant show some character (�,�,ğ,ş,Ş,ı,İ etc.) How can i solve this problem.

Thanks.

veli ak�akaya
http://www.BT-tr.net
 
Paul Clapham
Sheriff
Posts: 21889
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by veli akcakaya:
- my properties file is UTF-8
There is your problem. Your properties file should be ISO-8859-1. Yes, I know that ISO-8859-1 doesn't support all the letters in Turkish. That's why the properties file format allows for various escapings, which you can read about in its documentation.
 
Hatem Alimam
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I had this problem before ...
my solution was making my compiler UTF-8
how is that ... I'm using JDeveloper so I made it that way ...
I want to my project environment and I changed my compiler unicode ...
Best regards.
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the linked documentation.

I'll quote an important part:
except the input/output stream is encoded in ISO 8859-1 character encoding. Characters that cannot be directly represented in this encoding can be written using Unicode escapes ; only a single 'u' character is allowed in an escape sequence. The native2ascii tool can be used to convert property files to and from other character encodings.
 
veli akcakaya
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
thanks everybody. i solved encoding problem with native2ascii.

Have a nice day.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!