[tex-k] Re: tcx files

Olaf Weber olaf@infovore.xs4all.nl
07 Mar 2002 08:50:46 +0100

Fabrice Popineau writes:

> I have been reported about something very unexpected when using them.
> The problem is that every thing seems to be translated, even some of
> the filenames you try to read. The net effect is that something like :

You're basically telling TeX that the file you're providing is encoded
_like this_.  I think that to try to exempt filenames in the file
would be hard or impossible in the general case (they can be generated
by macros, for example).  To have them translated some of the time
would be probably be even more confusing than the current situation.

I'm also not convinced that TeX's internal representation is
necessarily a better match to the character set used in filenames.

Still, some concrete examples might help to shape my thoughts on the

> c:\>pdflatex --fmt=pdflatex --translate-file cp850-fr foo

> results in "pdflatex.fmt" being translated through the
> pack_buffered_name procedure :

> @p procedure pack_buffered_name(@!n:small_number;@!a,@!b:integer);
> var k:integer; {number of positions filled in |name_of_file|}
> @!c: ASCII_code; {character being packed}
> @!j:integer; {index into |buffer| or |TEX_format_default|}
> begin if n+b-a+1+format_ext_length>file_name_size then
>   b:=a+file_name_size-n-1-format_ext_length;
> k:=0;
> for j:=1 to n do append_to_name(xord[TEX_format_default[j]]);
> for j:=a to b do append_to_name(buffer[j]);
> for j:=format_default_length-format_ext_length+1 to format_default_length do
>   append_to_name(xord[TEX_format_default[j]]);
> if k<=file_name_size then name_length:=k@+else name_length:=file_name_size;
> for k:=name_length+1 to file_name_size do name_of_file[k]:=' ';
> end;

> Probably not something we want ! Unless I'm wrong ?

> -- 
> Fabrice

Olaf Weber

               (This space left blank for technical reasons.)