users@jersey.java.net

[Jersey] Re: how to preserve HTML formatting for a byte[] by Jersey client

From: Jitesh Sinha -X (jisinha - Siliconweb Inc. at Cisco) <"Jitesh>
Date: Wed, 20 Jul 2011 11:03:54 -0700

I did exactly as Pavel suggested and I still see the issue.I tried to print the html string on both client side and server side and I see bullet points that appear completely fine on client side (like * ) are replaced on server side by characters
"â<U+0080>¢" .

Does anybody have any idea why would that happen?

Thanks
-Jitesh

-----Original Message-----
From: Tatu Saloranta [mailto:tsaloranta_at_gmail.com]
Sent: Tuesday, July 19, 2011 4:02 PM
To: users_at_jersey.java.net
Subject: [Jersey] Re: how to preserve HTML formatting for a byte[] by Jersey client

On Tue, Jul 19, 2011 at 3:02 PM, Jitesh Sinha -X (jisinha - Siliconweb
Inc. at Cisco) <jisinha_at_cisco.com> wrote:
> You may be correct - I was also confused whether it is HTMl or encoding
> issue.
> How do I get rid of this issue? Before uploading content is different
> and after uploading it is something else.

And you are sure that contents differ, comparing byte-by-byte? If so,
you need to ensure that encoding is properly declared, and that you
don't use methods that assume default encoding: for example calls like
'byte[] content = string.getBytes();' are dangerous since they use
whatever platform default encoding might be.

-+ Tatu +-