• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Download of text file, charset problem on Mac
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Download of text file, charset problem on Mac (From: Jon Kleiser <email@hidden>)

  • Prev by Date: Re: WO RichText Editor
  • Next by Date: Re: Default values in EOF
  • Previous by thread: Re: Download of text file, charset problem on Mac
  • Next by thread: Error WebObjects Builder after changed to UTF8Encoding
  • Index(es):
    • Date
    • Thread