[tex-hyphen] Loading patterns twice, OT1 and apostrophe

Jonathan Kew jonathan_kew at sil.org
Thu Jun 26 17:50:44 CEST 2008


On 25 Jun 2008, at 8:47 pm, Mojca Miklavec wrote:

> Hello Jonathan (or anyone else on the list),
>
> Can you please tell me if the way we load patterns for French, Latin
> and Danish is likely to work the same way as it did with old patterns?
> I have no idea how to test that.
>
> (Talking about the code in svn repository.)

I have not actually tested it but it looks to me like it should work.

> I also prepared some extracts of apostrophes (represented twice in
> UTF-8), but did anyone take a look at Petr's suggestion?

To use \savinghyphcodes, that is? I have never tested this in xetex,  
and I suspect nobody else has used it either! AFAIK, it should work,  
but only for the \lccodes of chars < 256; it has not been extended to  
cover all the Unicode character codes.

This means that you could try the following approach:

* use U+2019 (the "correct" Unicode apostrophe) in any patterns that  
require it, rather than U+0027

* when loading the patterns in a Unicode-capable engine, set
     \lccode"27="2019
     \savinghyphcodes=1

* when loading the patterns in an 8-bit engine, use active chars to  
map the apostrophe to 0x27, and set
     \lccode"27="27

The "reverse" strategy of setting \lccode"2019="27 for the patterns  
can *not* be preserved by \savinghyphcodes in xetex.


I have *NOT* tested this; I'll try to do so soon, but if someone else  
wants to experiment first, that would be very welcome.

JK



More information about the tex-hyphen mailing list