
Signature
Lothar Kimmeringer E-Mail: spamfang@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong
questions!
Thank for reply,
> You already asked that question in your other post
> "Post not appear on group ...".
Sorry for that.
>If native2ascii worked correctly there should be a lot
of lines looking like this:
greetings = \uxxxx\uyyyy\uzzzz...
when I am using native2ascii output look like:->
\ufffd\ufffdg r e e t i n g s = ( A 5 > & 9 G $ A * * M
0 / K M $ >
f a r e w e l l = ( A 5 > & 9 G $ A * * M 0 / K M $
i n q u i r y = 2 ? / G * / K @ 8 > , ? $ 9 K > !
> out.println(messages.getString("greetings"));
>To see what's transfered, can you do a
out.println(URLEncoder.encode(messages.getString("greetings"),
"UTF8"));
to be able to see what's received from the bundle?
out put is "Hello"
my property files are as follow :->
1>MessagesBundle.properties
greetings = Hello.
farewell = Goodbye.
inquiry = How are you?
2>MessagesBundle_de_DE.properties
greetings = Hallo.
farewell = Tsch??.
inquiry = Wie geht's?
3>MessagesBundle_hi_IN.properties
greetings =
farewell =
inquiry = !
Thanks
Amit Jain
Lothar Kimmeringer - 27 Aug 2007 18:35 GMT
> Thank for reply,
>> You already asked that question in your other post
[quoted text clipped - 7 lines]
> when I am using native2ascii output look like:->
> \ufffd\ufffdg r e e t i n g s
This is UnicodeLE. AFAIR you were specifying UTF-8 as encoding
to be converted. That's the wrong one. To solve that you can
do one of the following:
- Save your original file as UTF-8 (with Notepad you can
choose that in the Save-As dialog and do the native2ascii-
call as you were doing it before
- Call native2ascii with the encoding UnicodeLE.
>> out.println(messages.getString("greetings"));
>>To see what's transfered, can you do a
[quoted text clipped - 3 lines]
>
> out put is "Hello"
I meant it that way when you use the ressource-bundle with Hindi.
Regards, Lothar

Signature
Lothar Kimmeringer E-Mail: spamfang@kimmeringer.de
PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)
Always remember: The answer is forty-two, there can only be wrong
questions!
Amit Jain - 29 Aug 2007 14:00 GMT
> - Save your original file as UTF-8 (with Notepad you can
> choose that in the Save-As dialog and do the native2ascii-
> call as you were doing it before
> - Call native2ascii with the encoding UnicodeLE.
Result when I am using UnicodeLE are as follow:->
C:\>native2ascii -encoding UnicodeLE MessagesBundle_hi_IN.properties
name.properties
java.io.UnsupportedEncodingException: UnicodeLE
> >> out.println(messages.getString("greetings"));
> >>To see what's transfered, can you do a
[quoted text clipped - 5 lines]
>
> I meant it that way when you use the ressource-bundle with Hindi.
Yes output is "Hello" when I am using Resource Bundle with Hindi.
Lew - 29 Aug 2007 14:28 GMT
>> - Save your original file as UTF-8 (with Notepad you can
>> choose that in the Save-As dialog and do the native2ascii-
[quoted text clipped - 6 lines]
> name.properties
> java.io.UnsupportedEncodingException: UnicodeLE
Perhaps because you gave an invalid argument for the encoding.
From "man native2ascii":
> -encoding encoding_name
> Specify the encoding name which is used by the conversion procedure.
[quoted text clipped - 3 lines]
> <http://java.sun.com/javase/6/docs/technotes/guides/intl/encoding.doc.html>
> document.
You will notice that "UnicodeLE" is not listed there.
There is a correct name for that encoding listed. What happens if you try that?

Signature
Lew