Hi,

here a small patch to the LaTeX handling again. This time it is for three
characters that theoretically LaTeX with the latin1 encoding should
handle correctly, but doesn't. This implements an alternative representation
that works.

The result on paper is the same though the LaTeX code is different.

BTW (off topic) I have come across two Word documents in Swedish (both Word 
8) that produce wrong output using the encoding CP1250. When changing the 
encoding on line 139 of text.c into ISO-8859-1 (or CP1252) and recompiling, 
the output is correct. 

Any comments on this? Apparently a LID value of 0x041d does not always
imply the CP1250 encoding. But where is this info in the Word file? And can/do 
we extract it?

-- 
Martin Vermeer [EMAIL PROTECTED]   Phone +358 9 295 55 215   Fax +358 9 295 55 200
Finnish Geodetic Institute    Geodeetinrinne 2    FIN-02430 Masala FINLAND
:wq
Index: text.c
===================================================================
RCS file: /cvsroot/wv/text.c,v
retrieving revision 1.45
diff -u -r1.45 text.c
--- text.c      2000/08/16 01:06:09     1.45
+++ text.c      2000/08/22 15:00:04
@@ -552,6 +555,19 @@
 
        if ( (char16 >= 0xa0) && (char16 <= 0xff) ) 
        {
+       switch(char16)
+               {
+               /* Fix up these as math characters: */
+               case 0xb2:
+                       printf("$\\mathtwosuperior$");
+                       return(1);
+               case 0xb3:
+                       printf("$\\maththreesuperior$");
+                       return(1);
+               case 0xb9:
+                       printf("$\\mathonesuperior$");
+                       return(1);
+               }
                printf("%c", char16);
                return(1);
        }

Reply via email to