develooper Front page | perl.unicode | Postings from February 2014

Choice of BOM for UTF-16 encoding

Thread Next
Geoffrey Leach
February 10, 2014 06:34
Choice of BOM for UTF-16 encoding
Message ID:
I'm the maintainer of Audio::Taglib. 

Summary of my perl5 (revision 5 version 16 subversion 3) configuration:
    osname=linux, osvers=3.10.9-200.fc19.x86_64, archname=x86_64-linux-thread-multi
$utf16 = encode("UTF-16", "\x{6211}\x{7684}") prepends a big-endian BOM. As best I can tell this results from U8 endian = *((U8 *)SvPV_nolen(attr("endian", 6))); in Unicode/Unicode.xs returning null in Unicode/Unicode.xs

I presume this is what's intended. Is there a way to force (from my module) the choice to be LE? It turns out that the library I'm supporting (taglib) works in LE.

Testcase attached.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About