[luatex] behavior of \write in LuaTeX differs from the one of PdfTeX/XeTeX

jfbu jfbu at free.fr
Thu Mar 26 17:09:12 CET 2015


Le 25 mars 2015 à 22:28, Hans Hagen <pragma at wxs.nl> a écrit :
>> [...]
>> where is the -8bit option documented? all info I could get is from
>> 
>> pdftex --help
>> 
>> -8bit                   make all characters printable by default
>> 
>> man pdftex did not bring anything, and in the PdfTeX pdftex-a.pdf
>> a search for 8bit does not bring anything either
>> 
>> I am not sure I understand what "make all characters printable by default"
>> says exactly. I know now that a catcode 12 ^^M will be printed as
>> character with ascii code 13, is that all there is to it? and how does
>> that related to "8bit" ?
> 
> it means that characters < 32 will be output as byte and not as ^^<letter> which is needed for proper round-trip usage and also makes files acceptable for other applications
> 

this answers it, thanks. 

"-8bit" denomination is a bit strange, as the affected stuff are control characters of the 7bit ASCII set (and already  etex prints >127 characters as is, well at least in my limited experience at least regarding é, à, ... be it uft-8 or latin-1, for example when docstrip is invoked via etex on an .ins file, contrarily to tex82 which writes stuff like ^^c3^^a9, ^^c3^^a0 for utf-8 case and ^^e9, ^^e0 for latin-1 case)

Even if I had seen -8bit option somewhere in past (perhaps I have, but the other day I have not found it elsewhere than via pdftex --help), I would not have immediately guessed it had to do with ASCII Control characters.



> btw, the -translate-file option can be used for input mapping
> 
> luatex is an utf8 engine and if you want something not-8 bit or utf you can use callbacks to implement whatever you want
> 

noted


> in addition to this there are also catcodes involved and how these are set up depends on the macro package (for instance you use \obeylines which quite certainly has a different implementation in different macropackages and that influences input end-of-line handling too)


ok, but I don't understand here your reference to \obeylines, as there was no \obeylines but a \catcode13=12 in my code, but maybe that's just a missing "if you use \obeylines.."

anyway, thanks again

Jean-François


More information about the luatex mailing list