perl-unicode

Choice of BOM for UTF-16 encoding

2014-02-10 00:34:48
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.

Thanks.

Attachment: encode-test.pl
Description: Perl program

<Prev in Thread] Current Thread [Next in Thread>