From: Xavier Noria Date: 2007-02-16T20:06:36+09:00 Subject: PDF::Writer and Unicode According to the current manual PDF documents generated by PDF::Writer can use UTF-16BE, but after a few trials with iconv I can't get my UTF-8 strings right. Example: $KCODE = 'u' require 'rubygems' require 'pdf/writer' require 'iconv' str = Iconv.iconv('UTF-16BE', 'UTF-8', '� � �') pdf = PDF::Writer.new # renders � and � right, but not � pdf.text str # same output with garbage prepended pdf.text "\xfe\xff#{str}" pdf.save_as('unicode_test.pdf') The manual does not document if any encoding is needed for select_font, I've played around with variations of # gives complete garbage pdf.select_font 'Times-Roman', :encoding => 'UTF-16BE' without luck. TextMate is generating UTF-8 source files for sure. Any ideas? -- fxn