[OS X TeX] TeXShop, perl and utf-8 encoding problems

Stephen Moye stephenmoye at cox.net
Sun Feb 20 12:28:52 EST 2005


On Feb 20, 2005, at 8:13 AM, Jonathan Kew wrote:

> On 20 Feb 2005, at 10:43 am, Stephen Moye wrote:
>
>> I have written a perl script that converts TeX-style accents (eg \"o) 
>> to their equivalents (ö). This is to convert a large number of 
>> Textures documents for use with TeXShop/XeTeX.
>>
>> Most of the accents come through when TeXed by TeXShop/XeTeX, but 
>> there are some problems such as ï and ç which do not appear in the 
>> TeXShop/XeTeX PDF -- they are completely missing.
>>
>> <snip>
>
> If I'm understanding the problem, it sounds as though Perl may not be 
> writing the output as Unicode (UTF-8). Are you specifically requesting 
> this in your script? E.g., with an open() call such as:
> 	open(OUTFILE, ">:utf8", $outFileName);
> or by using the binmode() function to set the encoding layer of the 
> filehandle, once it's open.

Thanks for that tip. I'm still quite new to perl. Sadly, however, the 
output is producing human-unreadable TeX files and incorrect output 
when TeXed.

Stephen Moye
--------------------- Info ---------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
           & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Post: <mailto:MacOSX-TeX at email.esm.psu.edu>





More information about the MacOSX-TeX mailing list