# Wrong hyphenation with LY1 font ecoding?

Here I found the statement that no special hyphenation patterns are needed with LY1 font encoding. Yet I stumbled upon different hyphenation in connection with non-letters (such as quotation marks) in utf8 input:

\documentclass[ngerman]{article}
\usepackage[utf8x]{inputenc}
\usepackage{babel}
\usepackage[LY1]{fontenc}
\def\foo{Michelsberg „Michelsberg Michelsberg“ }
\begin{document}
\LARGE
\foo\foo\foo\foo\foo\foo\foo Michelsberg!
Michelsberg, \foo Michelsberg? \foo\foo\foo Michelsberg.
\end{document}


One instance of a hyphenation Michelsber-g“ occurs in the output. With other encodings (e.g. T1), only the correct hyphenations (Mi-chels-berg) are used (or even tried as a look into the log shows). Is there a way to systematically prevent this problem with LY1?

-
Is there any particular reason to use LY1? –  David Carlisle Nov 17 '13 at 22:09

The German closing quotes (English opening quotes) are in position octal 223 in LY1, whereas T1 has an uppercase letter (Ş) with a corresponding lowercase. Thus the double quote character participates in hyphenation because it has a non zero \lccode. A hyphenation ber-g is surely acceptable mid word and, as far as TeX is concerned, the g is followed by another letter.

You solve this issue by adding

\AtBeginDocument{\lccode'223=0 }


There are probably other characters that need the same treatment: all punctuation characters that are in different position in LY1 with respect to T1; also the \lccode and \uccode vectors should be updated for letters in different positions.
That sounds very plausible (though ber-g should only be acceptable midword if followed by a vowel or possibly liquida, though even these may occur in composita with berg-) –  Hagen von Eitzen Nov 18 '13 at 18:07