diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-09-04 18:46:28 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-09-04 18:46:28 +0000 |
| commit | 82fe05afd1e5df0a45b34ac42af15e61844865f7 (patch) | |
| tree | 2a5efb8448a265a0d5105b0468a6cf906a8140dc | |
| parent | 83e724d7612d9549f420ae115bc38b2429992bf8 (diff) | |
STR #1411: fixed latin-to-macRoman text conversion
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5408 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | src/fl_encoding_latin1.cxx | 6 |
2 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.8 + - Fixed latin-to-roman text conversion (STR #1411) - Fixed Cygwin timeout for "select" calls (STR #1151) - Improved Mac OS X subwindow handling (STR #1402) - Fixed more inconsistencies between fl_draw diff --git a/src/fl_encoding_latin1.cxx b/src/fl_encoding_latin1.cxx index 49a23affc..44f65334e 100644 --- a/src/fl_encoding_latin1.cxx +++ b/src/fl_encoding_latin1.cxx @@ -50,7 +50,7 @@ // unknown characters with an upsidedown question mark. // This table converts MSWindows-1252/Latin 1 into MacRoman encoding -static uchar latin2roman[256] = { +static uchar latin2roman[128] = { 0xdb, 0xc0, 0xe2, 0xc4, 0xe3, 0xc9, 0xa0, 0xe0, 0xf6, 0xe4, 0xc0, 0xdc, 0xce, 0xc0, 0xc0, 0xc0, 0xc0, 0xd4, 0xd5, 0xd2, 0xd3, 0xa5, 0xd0, 0xd1, 0xf7, 0xaa, 0xc0, 0xdd, 0xcf, 0xc0, 0xc0, 0xd9, 0xca, 0xc1, 0xa2, 0xa3, 0xc0, 0xb4, 0xc0, 0xa4, 0xac, 0xa9, 0xbb, 0xc7, 0xc2, 0xc0, 0xa8, 0xf8, @@ -62,7 +62,7 @@ static uchar latin2roman[256] = { }; // This table converts MacRoman into MSWindows-1252/Latin 1 -static uchar roman2latin[256] = { +static uchar roman2latin[128] = { 0xc4, 0xc5, 0xc7, 0xc9, 0xd1, 0xd6, 0xdc, 0xe1, 0xe0, 0xe2, 0xe4, 0xe3, 0xe5, 0xe7, 0xe9, 0xe8, 0xea, 0xeb, 0xed, 0xec, 0xee, 0xef, 0xf1, 0xf3, 0xf2, 0xf4, 0xf6, 0xf5, 0xfa, 0xf9, 0xfb, 0xfc, 0x86, 0xb0, 0xa2, 0xa3, 0xa7, 0x95, 0xb6, 0xdf, 0xae, 0xa9, 0x99, 0xb4, 0xa8, 0xbf, 0xc6, 0xd8, @@ -87,7 +87,7 @@ const char *fl_latin1_to_local(const char *t, int n) const uchar *src = (const uchar*)t; uchar *dst = (uchar*)buf; for ( ; n>0; n--) { - uchar c = *src; + uchar c = *src++; if (c>127) *dst = latin2roman[c-128]; else |
