Hi

running the following command fails:

LC_CTYPE="UTF-8" LANG="en_US.UTF-8"
PATH="/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin" texi2dvi
--pdf --batch foo.texi
sed: RE error: illegal byte sequence

while this one works:

LC_CTYPE="UTF-8" LANG="en_US.UTF-8"
PATH="/opt/local/bin:/opt/local/sbin:/opt/local/libexec/gnubin:/usr/bin:/bin:/usr/sbin:/sbin"
texi2dvi --pdf --batch foo.texi

The difference is that first call uses bsdsed on my OS X system, while the other
one uses gnused.

To make texi2dvi work on that specific input file with bsdsed, changing the
environment variables like this is required:

LC_CTYPE="ISO8859-15" LANG="en_US.ISO8859-15"
PATH="/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin" texi2dvi
--pdf --batch foo.texi


From that I take that bsdsed does not like working on files encoded with another
character set than set as the current locale.

So, to make texi2dvi bsdsed compatible, it would need to
  - detect the charset of the input file
  - set LC_CTYPE and LANG accordingly when calling sed.

Any ideas?


Best regards



Mihai
\input texinfo                  @c -*-texinfo-*-
@c %**start of header
@setfilename bsdsedfailexample.info
@settitle bsdsed failure example

bsdsed fails here (while the character seems to be removed when running with 
gnused): �

@bye

@c End:

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to