mirror of
https://github.com/fltk/fltk.git
synced 2026-06-04 23:42:15 +08:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user