More Mac::Glue Endianness Stuff: Unicode
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:
This is, obviously, a problem with Intel Macs.
So, here's the fix:
require Config;New release coming soon.
my $bom = $Config::Config{byteorder} eq '1234' ? 'LE' : 'BE';
return new AEDesc typeUnicodeText, Encode::encode('UTF-16'.$bom, $_[0]);
Leave a comment