• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Turkish Character Problem in Properties Files

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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" />
<h:outputText 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
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
thanks everybody. i solved encoding problem with native2ascii.

Have a nice day.
 
reply
    Bookmark Topic Watch Topic
  • New Topic