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

Choice of BOM for UTF-16 encoding

Thread Next
From:
Geoffrey Leach
Date:
February 10, 2014 06:34
Subject:
Choice of BOM for UTF-16 encoding
Message ID:
1391990370.1789.1@puget.mtranch.com
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.
Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About