On 3/10/07, Aredridel <aredridel / nbtsc.org> wrote:
> On Sat, 2007-03-10 at 22:26 +0900, Austin Ziegler wrote:
> > On 3/9/07, Daniel Finnie <danfinnie / optonline.net> wrote:
> > > I have searched and searched and came up with nothing about the
> > > /current/ state of UTF-8 with PDF-Writer.  Has any one had any luck with it?
> > Then you haven't searched enough. I'm sorry to be so blunt, but I have
> > been consistent and clear: PDF::Writer does not and will NEVER support
> > UTF-8 natively. Why? Because the PDF specification does not support
> > UTF-8.
> >
> > So, forget about using UTF-8. Period. I will never provide support for
> > it. (In Ruby 1.9, this may be alleviated by the use of m17n strings,
> > but I'm not going out of my way to support UTF-8; when I add unicode
> > support, it will be UTF-16 only).
> I'd suggest supporting UTF-8 and handling conversion internally, rather
> than making users scatter Iconv calls everywhere, since UTF-8 is rather
> the norm on the internet. Better to do it internally, especially since
> the conversion between UTF-8 and UTF-16 is perfect in both directions.

Not doing it. Not before Ruby 1.9, at a very minimum. Even then, I'm
only going to believe what the user sets their m17n string as. The new
methods to add Unicode text will be UTF-16 only (why? because iconv
isn't default on all platforms, so I can't trust it to be there). Once
I have the new methods written, if someone wants to write a wrapper
layer to handle UTF-8 and all of the validation involved, they're
welcome to.

I'm not supporting UTF-8 at all until Ruby 1.9 has enough uptake to
abandon Ruby 1.8 as a platform. That may disappoint some folks, but
I'm not fighting against the spec, and I'm not breaking support for
PDF::Writer on some platforms because they don't have iconv.

-austin
-- 
Austin Ziegler * halostatue / gmail.com * http://www.halostatue.ca/
               * austin / halostatue.ca * http://www.halostatue.ca/feed/
               * austin / zieglers.ca