diff --git a/harbour/ChangeLog b/harbour/ChangeLog index c094518a95..db6b88a595 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,113 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-11-09 21:18 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/ChangeLog + * marked last TOFIX note as [DONE] - thanks to Mindaugas + + * harbour/src/rtl/cdpapi.c + * use 1-st upper<->lower conversion pair instead of last one + if more then one conversion pair exist - it's more natural + form in most of cases + % skip translation code when two different CDP modules use + the same Unicode table + + * harbour/tests/cpinfo.prg + + detect CPs which have corresponding upper or lower characters + for non alpha characters and inform about it. + Such situations is in NTXSPA.OBJ so such CP can be fully + replicated in Harbour using alternative CP definition only + which uses static tables. + + * harbour/src/codepage/cpes850c.c + * harbour/src/codepage/cpesisoc.c + * harbour/src/codepage/cpeswinc.c + ! removed the hack with changed order for characters which do not + have corresponding upper latter. + Now there is only one difference between ES850C and Clipper NTXSPA.OBJ + In NTXSPA 'UPPER( Chr( 163 ) )' gives "U" though Chr( 163 ) is not + marked as letter and not sorted with other letters. For me it looks + like a bug anyhow if you want to fully replicate NTXSPA.OBJ in Harbour + then current cpes850c.c code should be replaced by code generated + using tests/cpinfo.prg compiler by clipper and linked with ntxspa.obj. + Such code should be generated using: + cpinfo.exe es850c "Spanish CP-850 (ntxspa.obj compatible)" 850 + + Now translations can be done between CPs using different number of + letters or even defined for different languages so I have question + to Spanish users: Do you need ESISOC and ESWINC for anything? + If not then I would like to remove them. + Similar situation is with HUISOS and HUWINS. + + * harbour/include/hbapicdp.h + * harbour/src/rtl/cdpapi.c + * harbour/src/codepage/ucmacce.c + * harbour/src/codepage/uckoi8.c + * harbour/src/codepage/uc885910.c + * harbour/src/codepage/ucmacice.c + * harbour/src/codepage/uc885914.c + * harbour/src/codepage/uc874.c + * harbour/src/codepage/uc857.c + * harbour/src/codepage/uc1250.c + * harbour/src/codepage/uc1254.c + * harbour/src/codepage/uc1258.c + * harbour/src/codepage/uckoi8u.c + * harbour/src/codepage/uckam.c + * harbour/src/codepage/uc424.c + * harbour/src/codepage/ucmacrom.c + * harbour/src/codepage/uc862.c + * harbour/src/codepage/cpesisoc.c + * harbour/src/codepage/uc866.c + * harbour/src/codepage/uc8859_3.c + * harbour/src/codepage/cpes850c.c + * harbour/src/codepage/uc8859_7.c + * harbour/src/codepage/ucmacgrk.c + * harbour/src/codepage/uc037.c + * harbour/src/codepage/uc850.c + * harbour/src/codepage/uc885911.c + * harbour/src/codepage/uc885915.c + * harbour/src/codepage/uc875.c + * harbour/src/codepage/uc1251.c + * harbour/src/codepage/uc1255.c + * harbour/src/codepage/uc863.c + * harbour/src/codepage/ucmaz.c + * harbour/src/codepage/uc1026.c + * harbour/src/codepage/uc8859_4.c + * harbour/src/codepage/uc8859_8.c + * harbour/src/codepage/uc855.c + * harbour/src/codepage/cpeswinc.c + * harbour/src/codepage/uc885916.c + * harbour/src/codepage/ucascii.c + * harbour/src/codepage/uc1252.c + * harbour/src/codepage/uc1256.c + * harbour/src/codepage/ucatari.c + * harbour/src/codepage/uc860.c + * harbour/src/codepage/ucmaccyr.c + * harbour/src/codepage/ucmik.c + * harbour/src/codepage/uc864.c + * harbour/src/codepage/uc1006.c + * harbour/src/codepage/uc1125.c + * harbour/src/codepage/uc8859_1.c + * harbour/src/codepage/uc88591b.c + * harbour/src/codepage/uc8859_5.c + * harbour/src/codepage/uc8859_9.c + * harbour/src/codepage/uc852.c + * harbour/src/codepage/ucnext.c + * harbour/src/codepage/uc737.c + * harbour/src/codepage/uc885913.c + * harbour/src/codepage/ucmactrk.c + * harbour/src/codepage/uc856.c + * harbour/src/codepage/uc775.c + * harbour/src/codepage/uc1253.c + * harbour/src/codepage/uc1257.c + * harbour/src/codepage/uc500.c + * harbour/src/codepage/uc861.c + * harbour/src/codepage/uc865.c + * harbour/src/codepage/uc869.c + * harbour/src/codepage/uc8859_2.c + * harbour/src/codepage/uc8859_6.c + % declare Unicode tables with 'const' qualifier + 2009-11-09 18:45 UTC+0200 Mindaugas Kavaliauskas (dbtopas/at/dbtopas.lt) * harbour/contrib/rddads/adsx.c * harbour/contrib/rddsql/hbrddsql.h @@ -128,7 +235,7 @@ * updated to work with new CDP API TOFIX: update adsx.c and sqlmix.c to use hb_cdpcmp() which resepcts sorting with accented and mulitybyts characters. - Mindaugas, can you update above code? + Mindaugas, can you update above code? [DONE] * harbour/src/codepage/cpbg866.c * harbour/src/codepage/cpbgiso.c diff --git a/harbour/include/hbapicdp.h b/harbour/include/hbapicdp.h index 827e07b7a3..2ec3366495 100644 --- a/harbour/include/hbapicdp.h +++ b/harbour/include/hbapicdp.h @@ -81,7 +81,7 @@ typedef USHORT HB_WCHAR; typedef struct _HB_UNITABLE { const char * uniID; - HB_WCHAR * uniCodes; + const HB_WCHAR * uniCodes; unsigned char * uniTrans; HB_WCHAR wcMax; } HB_UNITABLE, * PHB_UNITABLE; diff --git a/harbour/src/codepage/cpes850c.c b/harbour/src/codepage/cpes850c.c index 01962e4c68..d28154a3d1 100644 --- a/harbour/src/codepage/cpes850c.c +++ b/harbour/src/codepage/cpes850c.c @@ -56,11 +56,11 @@ /* Codepage: 850 */ #define HB_CP_ID ES850C -#define HB_CP_INFO "Spanish CP-850" +#define HB_CP_INFO "Spanish CP-850 (ntxspa.obj compatible)" #define HB_CP_UNITB HB_UNITB_850 #define HB_CP_ACSORT HB_CDP_ACSORT_NONE -#define HB_CP_UPPER "AABCDEFGHIIJKLMN¥OOPQRSTUUVWXYšZŽ™" -#define HB_CP_LOWER " abcde‚fgh¡ijklmn¤¢opqrst£uvwxyz†„”" +#define HB_CP_UPPER "AABCDEFGHIIJKLMN¥OOPQRSTU VWXYšZŽ™" +#define HB_CP_LOWER "a bcde‚fghi¡jklmn¤o¢pqrstu—vwxyz†„”" /* include CP registration code */ #include "hbcdpreg.h" diff --git a/harbour/src/codepage/cpesisoc.c b/harbour/src/codepage/cpesisoc.c index 9796459fb6..7fb71d4b86 100644 --- a/harbour/src/codepage/cpesisoc.c +++ b/harbour/src/codepage/cpesisoc.c @@ -60,7 +60,7 @@ #define HB_CP_UNITB HB_UNITB_8859_1 #define HB_CP_ACSORT HB_CDP_ACSORT_NONE #define HB_CP_UPPER "AABCDEÉFGHIIJKLMNÑOOPQRSTUUVWXYÜZÅÄÖ" -#define HB_CP_LOWER "áabcdeéfghíijklmnñóopqrstúuvwxyüzåäö" +#define HB_CP_LOWER "aábcdeéfghiíjklmnñoópqrstuúvwxyüzåäö" /* include CP registration code */ #include "hbcdpreg.h" diff --git a/harbour/src/codepage/cpeswinc.c b/harbour/src/codepage/cpeswinc.c index c2c42700c4..d85f886238 100644 --- a/harbour/src/codepage/cpeswinc.c +++ b/harbour/src/codepage/cpeswinc.c @@ -60,7 +60,7 @@ #define HB_CP_UNITB HB_UNITB_1252 #define HB_CP_ACSORT HB_CDP_ACSORT_NONE #define HB_CP_UPPER "AABCDEÉFGHIIJKLMNÑOOPQRSTUUVWXYÜZÅÄÖ" -#define HB_CP_LOWER "áabcdeéfghíijklmnñóopqrstúuvwxyüzåäö" +#define HB_CP_LOWER "aábcdeéfghiíjklmnñoópqrstuúvwxyüzåäö" /* include CP registration code */ #include "hbcdpreg.h" diff --git a/harbour/src/codepage/uc037.c b/harbour/src/codepage/uc037.c index fbbf768e75..d79146d898 100644 --- a/harbour/src/codepage/uc037.c +++ b/harbour/src/codepage/uc037.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1006.c b/harbour/src/codepage/uc1006.c index ccc41fca5d..870ee87155 100644 --- a/harbour/src/codepage/uc1006.c +++ b/harbour/src/codepage/uc1006.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1026.c b/harbour/src/codepage/uc1026.c index b839770f56..a0bb22e460 100644 --- a/harbour/src/codepage/uc1026.c +++ b/harbour/src/codepage/uc1026.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1125.c b/harbour/src/codepage/uc1125.c index dad5572bfb..ade64e9a2b 100644 --- a/harbour/src/codepage/uc1125.c +++ b/harbour/src/codepage/uc1125.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1250.c b/harbour/src/codepage/uc1250.c index c32f3717e0..7e32392e9d 100644 --- a/harbour/src/codepage/uc1250.c +++ b/harbour/src/codepage/uc1250.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1251.c b/harbour/src/codepage/uc1251.c index 8cd4d36c9e..6aeb350567 100644 --- a/harbour/src/codepage/uc1251.c +++ b/harbour/src/codepage/uc1251.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1252.c b/harbour/src/codepage/uc1252.c index 02edeff70b..216cb987ab 100644 --- a/harbour/src/codepage/uc1252.c +++ b/harbour/src/codepage/uc1252.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1253.c b/harbour/src/codepage/uc1253.c index 365a44192c..c0a122430b 100644 --- a/harbour/src/codepage/uc1253.c +++ b/harbour/src/codepage/uc1253.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1254.c b/harbour/src/codepage/uc1254.c index 8125e92755..1e80f225e0 100644 --- a/harbour/src/codepage/uc1254.c +++ b/harbour/src/codepage/uc1254.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1255.c b/harbour/src/codepage/uc1255.c index e26a11dd27..0edf97a526 100644 --- a/harbour/src/codepage/uc1255.c +++ b/harbour/src/codepage/uc1255.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1256.c b/harbour/src/codepage/uc1256.c index 10700cf1e1..7861d3e213 100644 --- a/harbour/src/codepage/uc1256.c +++ b/harbour/src/codepage/uc1256.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1257.c b/harbour/src/codepage/uc1257.c index 1014a9dc5f..824a0eac2b 100644 --- a/harbour/src/codepage/uc1257.c +++ b/harbour/src/codepage/uc1257.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc1258.c b/harbour/src/codepage/uc1258.c index 546588e52f..88c17bc895 100644 --- a/harbour/src/codepage/uc1258.c +++ b/harbour/src/codepage/uc1258.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc424.c b/harbour/src/codepage/uc424.c index 6d667cecb3..b779fdb459 100644 --- a/harbour/src/codepage/uc424.c +++ b/harbour/src/codepage/uc424.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc500.c b/harbour/src/codepage/uc500.c index 34d6531fbb..b67c69709a 100644 --- a/harbour/src/codepage/uc500.c +++ b/harbour/src/codepage/uc500.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc737.c b/harbour/src/codepage/uc737.c index a17e4a9acf..32ddd490e1 100644 --- a/harbour/src/codepage/uc737.c +++ b/harbour/src/codepage/uc737.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc775.c b/harbour/src/codepage/uc775.c index 39e22d5f7f..cbdbe2d829 100644 --- a/harbour/src/codepage/uc775.c +++ b/harbour/src/codepage/uc775.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc850.c b/harbour/src/codepage/uc850.c index 99d9b00e33..720081000f 100644 --- a/harbour/src/codepage/uc850.c +++ b/harbour/src/codepage/uc850.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc852.c b/harbour/src/codepage/uc852.c index 1470c5f965..ae57b983bf 100644 --- a/harbour/src/codepage/uc852.c +++ b/harbour/src/codepage/uc852.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc855.c b/harbour/src/codepage/uc855.c index 9d55dc2569..b4296c23ee 100644 --- a/harbour/src/codepage/uc855.c +++ b/harbour/src/codepage/uc855.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc856.c b/harbour/src/codepage/uc856.c index 3bf5d66043..b713b87efe 100644 --- a/harbour/src/codepage/uc856.c +++ b/harbour/src/codepage/uc856.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc857.c b/harbour/src/codepage/uc857.c index 7b1881762c..be5eed598a 100644 --- a/harbour/src/codepage/uc857.c +++ b/harbour/src/codepage/uc857.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc860.c b/harbour/src/codepage/uc860.c index 93767177ee..9162a947de 100644 --- a/harbour/src/codepage/uc860.c +++ b/harbour/src/codepage/uc860.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc861.c b/harbour/src/codepage/uc861.c index 7eaa38b12b..98fb4b2a6b 100644 --- a/harbour/src/codepage/uc861.c +++ b/harbour/src/codepage/uc861.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc862.c b/harbour/src/codepage/uc862.c index acc20e9e4b..e924259443 100644 --- a/harbour/src/codepage/uc862.c +++ b/harbour/src/codepage/uc862.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc863.c b/harbour/src/codepage/uc863.c index 524880db48..98f0216109 100644 --- a/harbour/src/codepage/uc863.c +++ b/harbour/src/codepage/uc863.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc864.c b/harbour/src/codepage/uc864.c index 843cb27c16..e945ef8371 100644 --- a/harbour/src/codepage/uc864.c +++ b/harbour/src/codepage/uc864.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc865.c b/harbour/src/codepage/uc865.c index 12632b65a8..519f2ddb18 100644 --- a/harbour/src/codepage/uc865.c +++ b/harbour/src/codepage/uc865.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc866.c b/harbour/src/codepage/uc866.c index 55570c553b..2dc371d2dd 100644 --- a/harbour/src/codepage/uc866.c +++ b/harbour/src/codepage/uc866.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc869.c b/harbour/src/codepage/uc869.c index d2e329d86c..7d4017c50b 100644 --- a/harbour/src/codepage/uc869.c +++ b/harbour/src/codepage/uc869.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc874.c b/harbour/src/codepage/uc874.c index c710f2416d..40646b7a5c 100644 --- a/harbour/src/codepage/uc874.c +++ b/harbour/src/codepage/uc874.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc875.c b/harbour/src/codepage/uc875.c index 4f10de5047..9078dd3b2f 100644 --- a/harbour/src/codepage/uc875.c +++ b/harbour/src/codepage/uc875.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc885910.c b/harbour/src/codepage/uc885910.c index 6220669d34..e2d4fe2cfd 100644 --- a/harbour/src/codepage/uc885910.c +++ b/harbour/src/codepage/uc885910.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc885911.c b/harbour/src/codepage/uc885911.c index 7a1df66129..9c6add0f60 100644 --- a/harbour/src/codepage/uc885911.c +++ b/harbour/src/codepage/uc885911.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc885913.c b/harbour/src/codepage/uc885913.c index 4c339b9a5d..c44478448d 100644 --- a/harbour/src/codepage/uc885913.c +++ b/harbour/src/codepage/uc885913.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc885914.c b/harbour/src/codepage/uc885914.c index a4cb2520e4..f3d2acc9b5 100644 --- a/harbour/src/codepage/uc885914.c +++ b/harbour/src/codepage/uc885914.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc885915.c b/harbour/src/codepage/uc885915.c index 4bc1b174c2..9a6dbcef59 100644 --- a/harbour/src/codepage/uc885915.c +++ b/harbour/src/codepage/uc885915.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc885916.c b/harbour/src/codepage/uc885916.c index e5e023eb9c..840d5f95c1 100644 --- a/harbour/src/codepage/uc885916.c +++ b/harbour/src/codepage/uc885916.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc88591b.c b/harbour/src/codepage/uc88591b.c index ba503a1084..f2acfa8d29 100644 --- a/harbour/src/codepage/uc88591b.c +++ b/harbour/src/codepage/uc88591b.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_1.c b/harbour/src/codepage/uc8859_1.c index dbf6f14b01..f2b2032c99 100644 --- a/harbour/src/codepage/uc8859_1.c +++ b/harbour/src/codepage/uc8859_1.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_2.c b/harbour/src/codepage/uc8859_2.c index e5bfb6d46d..40f1220a2d 100644 --- a/harbour/src/codepage/uc8859_2.c +++ b/harbour/src/codepage/uc8859_2.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_3.c b/harbour/src/codepage/uc8859_3.c index a740e7ac40..09477135c0 100644 --- a/harbour/src/codepage/uc8859_3.c +++ b/harbour/src/codepage/uc8859_3.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_4.c b/harbour/src/codepage/uc8859_4.c index 0f0e5a5635..4802906330 100644 --- a/harbour/src/codepage/uc8859_4.c +++ b/harbour/src/codepage/uc8859_4.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_5.c b/harbour/src/codepage/uc8859_5.c index 26de5b4027..a1a9b08b96 100644 --- a/harbour/src/codepage/uc8859_5.c +++ b/harbour/src/codepage/uc8859_5.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_6.c b/harbour/src/codepage/uc8859_6.c index 827a430090..72d6f87c91 100644 --- a/harbour/src/codepage/uc8859_6.c +++ b/harbour/src/codepage/uc8859_6.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_7.c b/harbour/src/codepage/uc8859_7.c index f2edbebf69..37326a52d4 100644 --- a/harbour/src/codepage/uc8859_7.c +++ b/harbour/src/codepage/uc8859_7.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_8.c b/harbour/src/codepage/uc8859_8.c index 1bab62c68a..e71db20403 100644 --- a/harbour/src/codepage/uc8859_8.c +++ b/harbour/src/codepage/uc8859_8.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uc8859_9.c b/harbour/src/codepage/uc8859_9.c index 95d310756d..0e3ee25c45 100644 --- a/harbour/src/codepage/uc8859_9.c +++ b/harbour/src/codepage/uc8859_9.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucascii.c b/harbour/src/codepage/ucascii.c index a4ab5ceb9f..3089ede8fb 100644 --- a/harbour/src/codepage/ucascii.c +++ b/harbour/src/codepage/ucascii.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucatari.c b/harbour/src/codepage/ucatari.c index e414a270fe..ffdee86602 100644 --- a/harbour/src/codepage/ucatari.c +++ b/harbour/src/codepage/ucatari.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uckam.c b/harbour/src/codepage/uckam.c index e6fc8eb5ce..e520a96cc6 100644 --- a/harbour/src/codepage/uckam.c +++ b/harbour/src/codepage/uckam.c @@ -57,7 +57,7 @@ /* TOFIX: it's Mazovia CP not Kamenicky */ -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uckoi8.c b/harbour/src/codepage/uckoi8.c index 8a926b2b21..10455734b9 100644 --- a/harbour/src/codepage/uckoi8.c +++ b/harbour/src/codepage/uckoi8.c @@ -55,7 +55,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/uckoi8u.c b/harbour/src/codepage/uckoi8u.c index b1469c248a..03b18d1ad5 100644 --- a/harbour/src/codepage/uckoi8u.c +++ b/harbour/src/codepage/uckoi8u.c @@ -55,7 +55,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucmacce.c b/harbour/src/codepage/ucmacce.c index 08799dab26..1080403097 100644 --- a/harbour/src/codepage/ucmacce.c +++ b/harbour/src/codepage/ucmacce.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucmaccyr.c b/harbour/src/codepage/ucmaccyr.c index 99d04d3d71..aaba152d71 100644 --- a/harbour/src/codepage/ucmaccyr.c +++ b/harbour/src/codepage/ucmaccyr.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucmacgrk.c b/harbour/src/codepage/ucmacgrk.c index fad1473096..a5ce85d185 100644 --- a/harbour/src/codepage/ucmacgrk.c +++ b/harbour/src/codepage/ucmacgrk.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucmacice.c b/harbour/src/codepage/ucmacice.c index d0ff15b7d6..7ab8a14b4a 100644 --- a/harbour/src/codepage/ucmacice.c +++ b/harbour/src/codepage/ucmacice.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucmacrom.c b/harbour/src/codepage/ucmacrom.c index 8ae220b0df..de0af14ba8 100644 --- a/harbour/src/codepage/ucmacrom.c +++ b/harbour/src/codepage/ucmacrom.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucmactrk.c b/harbour/src/codepage/ucmactrk.c index 0ae51e9a03..f63b186725 100644 --- a/harbour/src/codepage/ucmactrk.c +++ b/harbour/src/codepage/ucmactrk.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucmaz.c b/harbour/src/codepage/ucmaz.c index ee2f8a594c..9b0dc5ad84 100644 --- a/harbour/src/codepage/ucmaz.c +++ b/harbour/src/codepage/ucmaz.c @@ -55,7 +55,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucmik.c b/harbour/src/codepage/ucmik.c index ac5b5ca7b4..555e6353fd 100644 --- a/harbour/src/codepage/ucmik.c +++ b/harbour/src/codepage/ucmik.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/codepage/ucnext.c b/harbour/src/codepage/ucnext.c index 0da6156a5f..e89861e0fb 100644 --- a/harbour/src/codepage/ucnext.c +++ b/harbour/src/codepage/ucnext.c @@ -54,7 +54,7 @@ #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, diff --git a/harbour/src/rtl/cdpapi.c b/harbour/src/rtl/cdpapi.c index 94447b9e37..24a0905b3d 100644 --- a/harbour/src/rtl/cdpapi.c +++ b/harbour/src/rtl/cdpapi.c @@ -86,7 +86,7 @@ static HB_CRITICAL_NEW( s_cdpMtx ); #define NUMBER_OF_CHARS 256 -static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = +static const HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = { 0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022, 0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C, @@ -125,11 +125,13 @@ static HB_WCHAR s_uniCodes[ NUMBER_OF_CHARS ] = HB_UNITABLE hb_uniTbl_437 = { HB_CPID_437, s_uniCodes, NULL, 0 }; static HB_CODEPAGE s_en_codepage = - { "EN", "", HB_UNITB_437, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL }; + { "EN", "English CP-437", HB_UNITB_437, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL }; + +HB_UNITABLE hb_uniTbl_UTF8 = { HB_CPID_437, s_uniCodes, NULL, 0 }; /* pseudo codepage for translations only */ static HB_CODEPAGE s_utf8_codepage = - { "UTF8", "", HB_UNITB_437, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL }; + { "UTF8", "UTF-8", &hb_uniTbl_UTF8, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL }; HB_CODEPAGE_ANNOUNCE( EN ) @@ -862,7 +864,7 @@ ULONG hb_cdpStrAsUTF8Len( PHB_CODEPAGE cdp, BOOL fCtrl, const char * pSrc, ULONG ulSrc, ULONG ulMax ) { - HB_WCHAR * uniCodes; + const HB_WCHAR * uniCodes; ULONG ulS, ulD, u; int i; @@ -916,7 +918,7 @@ ULONG hb_cdpStrToUTF8( PHB_CODEPAGE cdp, BOOL fCtrl, const char * pSrc, ULONG ulSrc, char * pDst, ULONG ulDst ) { - HB_WCHAR * uniCodes; + const HB_WCHAR * uniCodes; ULONG ulS, ulD, u; int i; @@ -1113,7 +1115,7 @@ ULONG hb_cdpTransLen( const char * pSrc, ULONG ulSrc, ULONG ulMax, { ULONG ulSize; - if( cdpIn && cdpOut && cdpIn != cdpOut ) + if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable ) { if( cdpIn == &s_utf8_codepage ) return hb_cdpUTF8AsStrLen( cdpOut, FALSE, pSrc, ulSrc, ulMax ); @@ -1196,7 +1198,7 @@ ULONG hb_cdpTransTo( const char * pSrc, ULONG ulSrc, { ULONG ulSize; - if( cdpIn && cdpOut && cdpIn != cdpOut ) + if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable ) { if( cdpIn == &s_utf8_codepage ) return hb_cdpUTF8ToStr( cdpOut, FALSE, pSrc, ulSrc, pDst, ulDst ); @@ -1314,7 +1316,7 @@ ULONG hb_cdpTransTo( const char * pSrc, ULONG ulSrc, int hb_cdpTranslateChar( int iChar, BOOL fCtrl, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ) { - if( cdpIn && cdpOut && cdpIn != cdpOut && + if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable && iChar >= ( fCtrl ? 32 : 0 ) && iChar < 256 ) { HB_WCHAR wc; @@ -1370,7 +1372,7 @@ const char * hb_cdpnDup3( const char * pSrc, ULONG ulSrc, char ** pFree, ULONG * pulSize, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ) { - if( cdpIn && cdpOut && cdpIn != cdpOut && ulSrc ) + if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable && ulSrc ) { char * pPrev = NULL; ULONG ulDst = hb_cdpTransLen( pSrc, ulSrc, 0, cdpIn, cdpOut ); @@ -1602,6 +1604,7 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, pup = pszUpper; plo = pszLower; ucUp2 = ucLo2 = 255; + memset( used, '\0', sizeof( used ) ); while( *pup ) { ucUp = ( unsigned char ) *pup++; @@ -1667,8 +1670,11 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, { flags[ ucUp ] |= HB_CDP_ALPHA; flags[ ucUp ] |= HB_CDP_UPPER; - if( ucLo != ' ' ) + if( ucLo != ' ' && ( used[ ucUp ] & HB_CDP_UPPER ) == 0 ) + { lower[ ucUp ] = ucLo; + used[ ucUp ] |= HB_CDP_UPPER; + } if( sort ) { if( sort[ ucUp ] == 0 ) @@ -1687,8 +1693,11 @@ static PHB_CODEPAGE hb_buildCodePage( const char * id, const char * info, { flags[ ucLo ] |= HB_CDP_ALPHA; flags[ ucLo ] |= HB_CDP_LOWER; - if( ucUp != ' ' ) + if( ucUp != ' ' && ( used[ ucLo ] & HB_CDP_LOWER ) == 0 ) + { upper[ ucLo ] = ucUp; + used[ ucLo ] |= HB_CDP_LOWER; + } if( sort ) { if( sort[ ucLo ] == 0 ) @@ -1987,7 +1996,7 @@ HB_FUNC( HB_TRANSLATE ) PHB_CODEPAGE cdpIn = szIdIn ? hb_cdpFindExt( szIdIn ) : hb_vmCDP(); PHB_CODEPAGE cdpOut = szIdOut ? hb_cdpFindExt( szIdOut ) : hb_vmCDP(); - if( cdpIn && cdpOut && cdpIn != cdpOut ) + if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable ) { char *szResult = hb_cdpnDup( hb_parc( 1 ), &ulLen, cdpIn, cdpOut ); hb_retclen_buffer( szResult, ulLen ); @@ -2295,7 +2304,7 @@ HB_FUNC( HB_UTF8STRTRAN ) #ifdef HB_LEGACY_LEVEL2 void hb_cdpnTranslate( char *psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, ULONG nChars ) { - if( cdpIn != cdpOut ) + if( cdpIn && cdpOut && cdpIn->uniTable != cdpOut->uniTable ) { ULONG ulDst = nChars; char * pDst = psz; @@ -2320,7 +2329,6 @@ void hb_cdpnTranslate( char *psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut, ULONG void hb_cdpTranslate( char *psz, PHB_CODEPAGE cdpIn, PHB_CODEPAGE cdpOut ) { - if( cdpIn != cdpOut ) - hb_cdpnTranslate( psz, cdpIn, cdpOut, strlen( psz ) ); + hb_cdpnTranslate( psz, cdpIn, cdpOut, strlen( psz ) ); } #endif diff --git a/harbour/tests/cpinfo.prg b/harbour/tests/cpinfo.prg index f43f9cfe35..917eadd7b3 100644 --- a/harbour/tests/cpinfo.prg +++ b/harbour/tests/cpinfo.prg @@ -114,10 +114,18 @@ proc main( cdp, info, unicode ) ? "character " + charis( c ) + " not defined as upper or lower" lWarn := .t. endif - elseif islower( c ) .or. isupper( c ) - ? "wrongly defined character " + ; - charval( c ) + ":" + charinfo( c ) - lWarn := .t. + else + if islower( c ) .or. isupper( c ) + ? "wrongly defined character " + ; + charval( c ) + ":" + charinfo( c ) + lWarn := .t. + endif + if ! lower( c ) == upper( c ) + ? "non alpha character has corresponding " + ; + iif( c == lower( c ), "upper", "lower" ) + " character " + ; + charval( c ) + ":" + charinfo( c ) + lWarn := .t. + endif endif next for i := 1 to len( cUp ) - 1 @@ -179,6 +187,8 @@ static function charinfo( c ) cInfo += ", ISUPPER->" + iif( isupper( c ), "Y", "N" ) cInfo += ", ISLOWER->" + iif( islower( c ), "Y", "N" ) cInfo += ", ISDIGIT->" + iif( isdigit( c ), "Y", "N" ) + cInfo += ", UPPER->'" + upper( c ) + "'" + cInfo += ", LOWER->'" + lower( c ) + "'" return cInfo