More Mac::Glue Endianness Stuff: Unicode

pudge on 2006-11-08T18:47:46

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.