> In the client, a method gets data[][] & writes to the screen. Am
> getting '?'. If I set the OutputStream's encoding as UTF-8, am getting
> 3 '?'s. For UTF-16. am getting 2 '?'s. Can someone please throw some
> light on this?

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!
Hi,
Thanks to all for your replies.
1. How do I change my system's default encoding?
2. Another method I tried is to instantiate PrintWriter like this:
OutputStreamWriter outWriter = new OutputStreamWriter(new
DataSEPipedOutputStream(), "UTF-8");
PrinWriter writer = new PrintWriter(outWriter, true);
But this gives '???' on the screen.
If I change that to UTF-16, instead of UTF-8, I get '??' on the screen.
Not sure why this weird behaviour.
Thanks.
> > In the client, a method gets data[][] & writes to the screen. Am
> > getting '?'. If I set the OutputStream's encoding as UTF-8, am getting
[quoted text clipped - 18 lines]
> Always remember: The answer is forty-two, there can only be wrong
> questions!
Lothar Kimmeringer - 09 Oct 2006 16:04 GMT
> 1. How do I change my system's default encoding?
Depends on the system.
> 2. Another method I tried is to instantiate PrintWriter like this:
>
[quoted text clipped - 3 lines]
>
> But this gives '???' on the screen.
If your console expects e.g. Latin-15, you simply don't fit
it the way being expected. You must use the encoding of the
console. It's not OK to just set the encoding in the way you
like.
> If I change that to UTF-16, instead of UTF-8, I get '??' on the screen.
That you already said in the original post. My answer is still
the same.
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!
Raga - 13 Oct 2006 11:23 GMT
Hi, Thanks for your reply. My system is Microsoft Windows XP. How do I
change its encoding? Can you please help?
Thanks.
> > 1. How do I change my system's default encoding?
>
[quoted text clipped - 25 lines]
> Always remember: The answer is forty-two, there can only be wrong
> questions!