Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

pudge
  (email not shown publicly)
http://pudge.net/
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Thursday February 12, 2004
08:09 PM

BOM BOM BOM

[ #17386 ]

In Mac::Glue, I have some code to automatically convert text to UTF-16 if typeUnicodeText (utxt) is expected. It uses Encode, and it seems to work fine for stuff like setting the iChat status message.

But when a user tried to send Unicode text to Adobe Photoshop CS, it failed. Hm.

After some experimentation, I found that if I sent the text without the BOM, using UTF-16BE to encode (big-endian is assumed without it ... though I am not sure if it will work that way should Mac OS ever run on a little-endian platform), it worked.

I found a technote describing how some apps couldn't handle the BOM when it was placed on the clipboard. I guess some apps have trouble with it in Apple events too, which is why I found that utxt data created by AppleScript and the like doesn't have the BOM either.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.