perl-unicode

Re: Choice of BOM for UTF-16 encoding

2014-02-10 01:52:01
* Geoffrey Leach <geoff(_at_)hughes(_dot_)net> [2014-02-10 07:35]:
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.

Does it need a BOM prepended?

If not, just do the obvious and `encode('UTF-16LE', $str)`.

C.f. `perldoc Encode::Unicode`.

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>

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