users@jersey.java.net

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

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Tue, 19 Jul 2011 16:01:33 -0700

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 +-