Re: Download of text file, charset problem on Mac
Re: Download of text file, charset problem on Mac
- Subject: Re: Download of text file, charset problem on Mac
- From: Jon Kleiser <email@hidden>
- Date: Thu, 28 Apr 2005 11:30:46 +0200
Jon,
Am 27.04.2005 um 15:47 schrieb Jon Kleiser:
The code I use to detect and convert now looks like the
lines below, but the result (when viewed by TextEdit, or BBEdit 7) is
not what it should be.
return new String(s.getBytes(), "MacRoman");
Here, you tell Java to convert from MacRoman into native encoding -
which of course does not help. The Mac's native encoding is also
MacRoman, i.e. this call does _nothing_.
...
Ralph
Thanks Ralph, for pointing out that my code tried to DECODE FROM
MacRoman. This code, however, encodes the way I want, at least when
running on Solaris:
return new String(s.getBytes("MacRoman"));
(When running on my developer Mac, no conversion happens. It
obviously thinks the text is MacRoman already ...)
Sometimes it pays to read the docs carefully ;-)
/Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden