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)

Wednesday November 08, 2006
01:47 PM

More Mac::Glue Endianness Stuff: Unicode

[ #31547 ]

In theory, you should be able to send Unicode data via Apple events with a BOM. It's documented to be optional, but some apps seem to choke on it. So I send Unicode text without a BOM.

This is, obviously, a problem with Intel Macs.

So, here's the fix:

require Config;
my $bom = $Config::Config{byteorder} eq '1234' ? 'LE' : 'BE';
return new AEDesc typeUnicodeText, Encode::encode('UTF-16'.$bom, $_[0]);

New release coming soon.

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.