Ive been looking at the Iconv elements of ruby, and Array.pack but im
really not sure how best to ensure that it is the correct byte order? Or
that the carriage returns are correct.
Ive been looking at the Iconv elements of ruby, and Array.pack but im
really not sure how best to ensure that it is the correct byte order? Or
that the carriage returns are correct.
What are peoples thoughts?
Thanks
Tim
For UNICODE-WIN and UNICODE-MAC, the tagged text file in its entirety
must be in UTF-16LE or UTF-16BE, respectively. (LE = Little Endian, BE =
Big
If the file is going to be used on windows, you need to write \r\n at
the end of the lines. If the file is going to be used on a Mac, you
need to write \n. If you program is going to be used on different os's
to generate that file, then can get the newline for the system from the
global variable $/, or to avoid using such cryptic variable names in
your code, you can require 'english' and use $INPUT_RECORD_SEPARATOR.
For UNICODE-WIN and UNICODE-MAC, the tagged text file in its entirety
must be in UTF-16LE or UTF-16BE, respectively. (LE = Little Endian, BE =
Big
So use those encodings with iconv.
Hey 7stud - the files indesign is exporting are utf16be, so i'll try and
match that. Otherwise, is there a way to write a utf-16 file without the
BOM? The exported tagged text from indesign doesnt appear to have a BOM.
Im only going to be using this on mac osx, so I should just be able to
use \n for a the line endings shouldnt i?