X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/254a21292b0ccf234ed1dbc6acd37708672ffcc0..694f70fa9c0cc8889c208020bf75b2e3861f6818:/utils/tex2rtf/src/rtfutils.cpp diff --git a/utils/tex2rtf/src/rtfutils.cpp b/utils/tex2rtf/src/rtfutils.cpp index 9e0f5b9ce7..5bc087ed67 100644 --- a/utils/tex2rtf/src/rtfutils.cpp +++ b/utils/tex2rtf/src/rtfutils.cpp @@ -240,6 +240,7 @@ void WriteWinHelpContentsFileLine(wxChar *topicName, wxChar *xitle, int level) wxChar title[255]; int s=0; int d=0; + // assuming iso-8859-1 here even in Unicode build (FIXME?) while ( (xitle[s]!=0)&&(d<255) ) { wxChar ch=wxChar(xitle[s]&0xff); @@ -248,12 +249,12 @@ void WriteWinHelpContentsFileLine(wxChar *topicName, wxChar *xitle, int level) wxChar ch2=wxChar(xitle[s+2]&0xff); wxChar ch3=wxChar(xitle[s+3]&0xff); s+=4; // next character - if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x36)) { title[d++]=_T('ö'); } - if ((ch1==0x27)&&(ch2==0x65)&&(ch3==0x34)) { title[d++]=_T('ä'); } - if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x63)) { title[d++]=_T('ü'); } - if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x36)) { title[d++]=_T('Ö'); } - if ((ch1==0x27)&&(ch2==0x63)&&(ch3==0x34)) { title[d++]=_T('Ä'); } - if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x63)) { title[d++]=_T('Ü'); } + if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x36)) { title[d++]=wxChar('ö'); } + if ((ch1==0x27)&&(ch2==0x65)&&(ch3==0x34)) { title[d++]=wxChar('ä'); } + if ((ch1==0x27)&&(ch2==0x66)&&(ch3==0x63)) { title[d++]=wxChar('ü'); } + if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x36)) { title[d++]=wxChar('Ö'); } + if ((ch1==0x27)&&(ch2==0x63)&&(ch3==0x34)) { title[d++]=wxChar('Ä'); } + if ((ch1==0x27)&&(ch2==0x64)&&(ch3==0x63)) { title[d++]=wxChar('Ü'); } } else { title[d++]=ch; s++; @@ -454,7 +455,7 @@ void WriteRTFHeader(FILE *fd) { wxFprintf(fd, _T("{\\rtf1\\%s \\deff0\n"), RTFCharset); wxFprintf(fd, _T("{\\fonttbl{\\f0\\froman Times New Roman;}{\\f1\\ftech Symbol;}{\\f2\\fswiss Arial;}\n")); - wxFprintf(fd, _T("{\\f3\\fmodern Courier;}{\\f4\\ftech Wingdings;}{\\f5\\ftech Monotype Sorts;}\n}")); + wxFprintf(fd, _T("{\\f3\\fmodern Courier New;}{\\f4\\ftech Wingdings;}{\\f5\\ftech Monotype Sorts;}\n}")); /* * Style sheet */ @@ -670,7 +671,7 @@ void ProcessText2RTF(TexChunk *chunk) i += 1; changed = true; } - else if (inVerbatim && (ch == '{' || ch == '}')) // Escape the curley bracket + else if (inVerbatim && (ch == '{' || ch == '}')) // Escape the curly bracket { BigBuffer[ptr] = '\\'; ptr ++; BigBuffer[ptr] = ch; ptr ++;