From: Austin Ziegler Date: 2008-01-03T22:53:44+09:00 Subject: Re: multibyte strings & bucket-of-bytes efficiency under 1.9.0 On Jan 3, 2008 1:04 AM, Martin Duerst wrote: > At 01:54 08/01/02, Austin Ziegler wrote: >> It should not simply return "UTF-16"; it should return either >> "UTF-16BE" or "UTF-16LE", depending on what was chosen. (Similarly, I >> should be able to force a particular byte order encoding; this matters >> to me because PDF Unicode is done with UTF-16BE.) > > That's a whole other dimension of UTF-16. My current thinking here > is about as follows: > > - Internally, there is usually something called UTF-16 which has > machine byte order. There should also be explicit endianness versions, > UTF-16BE and UTF-16LE. Right, but there needs to be a way for a program to programmatically tell which of the two (BE or LE) is actually used based on machine byte order. I realize that when work is done in PDF::Writer (or something similar) to enable proper Unicode output, we'll still probably need to call #force_encoding(Encoding::UTF16BE), but it'd be nice to not have to do that: foo.force_encoding(Encoding::UTF16BE) unless foo.encoding == Encoding::UTF16BE -austin -- Austin Ziegler * halostatue@gmail.com * http://www.halostatue.ca/ * austin@halostatue.ca * http://www.halostatue.ca/feed/ * austin@zieglers.ca