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
This commit is contained in:
Przemyslaw Czerpak
2009-11-09 20:22:48 +00:00
parent 2f44c8201e
commit bebed22350
69 changed files with 213 additions and 88 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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 "AABCDE<44>FGHIIJKLMN¥OOPQRSTUUVWXYšZ<EFBFBD>Ž™"
#define HB_CP_LOWER " abcdefgh¡ijklmn¤¢opqrst£uvwxy<EFBFBD>z†„”"
#define HB_CP_UPPER "AABCDE<44>FGHIIJKLMN¥OOPQRSTU VWXYšZ<EFBFBD>Ž™"
#define HB_CP_LOWER "a bcdefghi¡jklmn¤o¢pqrstuvwxy<EFBFBD>z†„”"
/* include CP registration code */
#include "hbcdpreg.h"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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,

View File

@@ -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

View File

@@ -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