The following is against the standard dvi2tty distribution, but don't forget to apply 'dvi2tty-latin1.patch' too. Purpose of this patch is to output some latin1 characters (mainly german umlauts and sz-ligature) when the '-s' command line option is used. NOTE: '-s' differs completely from the original behaviour! instead of using some DOS codepage characters, Latin-1 characters are used where possible. To apply these patches, use: patch < dvi2tty-german_umlauts.patch Thomas Sefzick t.sefzick@fz-juelich.de --- dvistuff.c.orig Wed Nov 29 18:05:40 2000 +++ dvistuff.c Wed Nov 29 18:08:52 2000 @@ -806,18 +806,30 @@ ch = 'l'; break; /* ligature */ case 16 : ch = 'i'; break; case 17 : ch = 'j'; break; - case 25 : outchar('s'); ch = 's'; break; /* German double s */ - case 26 : outchar('a'); ch = 'e'; break; /* Dane/Norw ae */ + case 25 : if (scascii) /* German sz ligature */ + ch = 0xdf; + else + {outchar('s'); ch = 's';} + break; + case 26 : if (scascii) /* Dane/Norw ae */ + ch = 0xe6; + else + {outchar('a'); ch = 'e';} + break; case 27 : outchar('o'); ch = 'e'; break; /* Dane/Norw oe */ - case 28 : if (scascii) - ch = '|'; /* Dane/Norw /o */ + case 28 : if (scascii) /* Dane/Norw /o */ + ch = 0xf8; else ch = 'o'; break; - case 29 : outchar('A'); ch = 'E'; break; /* Dane/Norw AE */ + case 29 : if (scascii) /* Dane/Norw AE */ + ch = 0xc6; + else + {outchar('A'); ch = 'E';} + break; case 30 : outchar('O'); ch = 'E'; break; /* Dane/Norw OE */ case 31 : if (scascii) - ch = '\\'; /* Dane/Norw /O */ + ch = 0xd8; /* Dane/Norw /O */ else ch = 'O'; break; @@ -872,18 +884,18 @@ /* This code does not really belong here ... /* /*-------------------------------------------------------------*/ - /* The following is very specialized code, it handles national */ - /* Swe/Fin characters. They are respectively: a and o with two */ - /* dots ("a & "o) and a with a circle (Oa). In Swe/Fin "ASCII" */ - /* these characters replace }{|][ and \. TeX outputs these by */ + /* The following is very specialized code, it handles some eu- */ + /* ropean characters. These are: a, o, u with two dots ("a & */ + /* "o & "u), and a with a circle (Oa). TeX outputs these by */ /* first issuing the dots or circle and then backspace and set */ - /* the a or o. When dvitty finds an a or o it searches in the */ - /* near vicinity for the character codes that represent circle */ - /* or dots and if one is found the corresponding national char */ - /* replaces the special character codes. */ + /* the a, o, or u. When dvitty finds an a, o, or u it sear- */ + /* ches in the near vicinity for the character codes that re- */ + /* present circle or dots and if one is found the correspon- */ + /* ding Latin-1 character replaces the special character code. */ /*-------------------------------------------------------------*/ if (scascii) { - if ((ch == 'a') || (ch == 'A') || (ch == 'o') || (ch == 'O')) { + if ((ch == 'a') || (ch == 'A') || (ch == 'o') || (ch == 'O') || + (ch == 'u') || (ch == 'U')) { for (i = IMAX(leftmargin, j-2); i <= IMIN(rightmargin, j+2); i++) @@ -896,18 +908,22 @@ switch (currentline->text[j - leftmargin]) { case 127 : case 34: if (ch == 'a') - ch = '{'; + ch = 0xe4; else if (ch == 'A') /* dots ... */ - ch = '['; + ch = 0xc4; else if (ch == 'o') - ch = '|'; + ch = 0xf6; else if (ch == 'O') - ch = '\\'; + ch = 0xd6; + else if (ch == 'u') + ch = 0xfc; + else if (ch == 'U') + ch = 0xdc; break; case 23 : if (ch == 'a') - ch = '}'; + ch = 0xe5; else if (ch == 'A') /* circle */ - ch = ']'; + ch = 0xc5; break; } }