aspose file tools
The moose likes JSF and the fly likes Turkish Character Problem in Properties Files Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » JSF
Reply Bookmark "Turkish Character Problem in Properties Files" Watch "Turkish Character Problem in Properties Files" New topic
Author

Turkish Character Problem in Properties Files

veli akcakaya
Greenhorn

Joined: Dec 19, 2008
Posts: 7
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
Bartender

Joined: Oct 14, 2005
Posts: 16487
    
    2

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

Joined: Dec 14, 2008
Posts: 30
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.


SCJP 5.0, SCWCD 1.4, SCBCD 3.0 with 100 score
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
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.


Code depot of a Java EE / JSF developer | JSF / Eclipse / Tomcat kickoff tutorial | DAO kickoff tutorial | I ♥ Unicode
veli akcakaya
Greenhorn

Joined: Dec 19, 2008
Posts: 7
Hi,
thanks everybody. i solved encoding problem with native2ascii.

Have a nice day.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Turkish Character Problem in Properties Files
 
Similar Threads
Character Encoding
JSF Navigation
Character Encoding in Servlet
cannot use utf-8 to store utf-8 character, please help
For Srikant -- Struts using Multilingual !!!