• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

translated strings bad encoding

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started translating JForum to Polish and have problem with encoding translated strings from pl_PL.properties. I tried UTF-8 and ISO-8859-2 and both don't work properly. I'm sure that pl_PL.properties encoding is the same as that I set in Admin Control Panel. Posts encoding works fine. Is this a new bug or I make somethink wrong?
[originally posted on jforum.net by kayne]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use UTF-8 system (forum) encoding and I had to use unicode hex entities instead of diacritics. It has one big advantage - you don't have to specify the encoding of properties file and It will work on all platforms. I use PSpad editor for transcoding national characters to unicode hex entities.
[originally posted on jforum.net by Tsafkiel]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx for reply. I think I found the reason of the problem. I18n class use java.util.Properties to store strings from properties files. According to javadoc Properties use ISO-8859-1 encoding which is not capable to encode Polish chars.
[originally posted on jforum.net by kayne]
 
Don't sweat petty things, or pet sweaty things. But cuddle this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic