I18n using property files and file encodings

Hi,

I painfully learned, that i18n properties have to be latin1 with
anything else encoded using \u. So using umlauts in IDEA's property
editor makes GUIs with funny characters instead of the ones
I wanted. In the GUI editor, they look perfectly fine, in the preview
and running application they are screwed up.

I understand, that I can set latin1 as the default encoding and encode
umlauts using \u by hand. However that's not what I expect, when I use
IDEA. ;)

So is there some easy way to specify the encoding for single files and
make IDEA to transform non-latin1 characters into \u ones
automatically?

Regards,
Hynek

2 comments

Hello Hynek,

I painfully learned, that i18n properties have to be latin1 with
anything else encoded using \u. So using umlauts in IDEA's property
editor makes GUIs with funny characters instead of the ones
I wanted. In the GUI editor, they look perfectly fine, in the preview
and running application they are screwed up.
I understand, that I can set latin1 as the default encoding and encode
umlauts using \u by hand. However that's not what I expect, when I use
IDEA. ;)

So is there some easy way to specify the encoding for single files and
make IDEA to transform non-latin1 characters into \u ones
automatically?


Settings | General | Properties Files | Transparent native-to-ascii conversion

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Hello Dmitry,

  • Dmitry Jemerov wrote on 2007-03-20:

I painfully learned, that i18n properties have to be latin1 with
anything else encoded using \u. So using umlauts in IDEA's property
editor makes GUIs with funny characters instead of the ones
I wanted. In the GUI editor, they look perfectly fine, in the
preview and running application they are screwed up.
I understand, that I can set latin1 as the default encoding and
encode umlauts using \u by hand. However that's not what I expect,
when I use IDEA. ;)
So is there some easy way to specify the encoding for single files
and make IDEA to transform non-latin1 characters into \u ones
automatically?

Settings | General | Properties Files | Transparent
native-to-ascii conversion


Great, I was sure, that there'll be some easy way. :) I'd be even so
bold to claim, that this option should be default...

Cheers,
Hynek

0

Please sign in to leave a comment.