2013-01-30 12:25 UTC+0100 Viktor Szakats (harbour syenar.net)

* src/codepage/cphr646.c
  * src/codepage/cpsl646.c
  * src/codepage/cpsr646.c
    ! fixed escape chars wrongly converted in prev commit

  * src/codepage/cpsr646c.c
    + converted to UTF-8.
    ; TODO: test it.

  * tests/cpinfo.prg
    + generate UTF-8 CP modules when using Harbour builds.

  ; NOTE: Now all CPs are using UTF-8 (#define HB_CP_UTF8)
          so now we may well delete the non-UTF-8 mode and
          the extra flag as well.
This commit is contained in:
Viktor Szakats
2013-01-30 11:26:58 +00:00
parent bc70e15c92
commit c33db1470e
6 changed files with 33 additions and 7 deletions

View File

@@ -10,6 +10,23 @@
* Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment
*/
2013-01-30 12:25 UTC+0100 Viktor Szakats (harbour syenar.net)
* src/codepage/cphr646.c
* src/codepage/cpsl646.c
* src/codepage/cpsr646.c
! fixed escape chars wrongly converted in prev commit
* src/codepage/cpsr646c.c
+ converted to UTF-8.
; TODO: test it.
* tests/cpinfo.prg
+ generate UTF-8 CP modules when using Harbour builds.
; NOTE: Now all CPs are using UTF-8 (#define HB_CP_UTF8)
so now we may well delete the non-UTF-8 mode and
the extra flag as well.
2013-01-30 10:34 UTC+0100 Viktor Szakats (harbour syenar.net)
- src/codepage/cphuutf.c
- deleted now obsolete sample
@@ -110,11 +127,11 @@
* renamed all cp filenames to match internal CP ID
; NOTE: CP646C aka 'Serbian ISO-646C (Cyrillic YUSCII)'
was not converted, and I have no idea what to do
with it. Do it if you know this.
with it. Do it if you know this. [DONE]
; Verify them.
I was getting all sorts of initialization failures
with non-UTF8 ones, after converting all of them,
I'm getting one for 'SR646'.
I'm getting one for 'SR646'. [DONE]
; If this settles, it offers interesting new possiblities,
because most of the "CP" modules now essentially differ
only in HB_CP_UNITB setting for a given country/language (=culture).

View File

@@ -56,7 +56,7 @@
#define HB_CP_INFO "Croatian ISO-646 (CROSCII)"
#define HB_CP_UNITB HB_UNITB_646YU
#define HB_CP_ACSORT HB_CDP_ACSORT_NONE
#define HB_CP_UPPER "ABCČĆDĐĐEFGHIJKLMNOPQRSŠTUVWXYZŽ"
#define HB_CP_UPPER "ABCČĆDĐEFGHIJKLMNOPQRSŠTUVWXYZŽ"
#define HB_CP_LOWER "abcčćdđefghijklmnopqrsštuvwxyzž"
#define HB_CP_UTF8

View File

@@ -55,7 +55,7 @@
#define HB_CP_INFO "Slovenian ISO-646 (SLOSCII)"
#define HB_CP_UNITB HB_UNITB_646YU
#define HB_CP_ACSORT HB_CDP_ACSORT_NONE
#define HB_CP_UPPER "ABCČĆDĐĐEFGHIJKLMNOPQRSŠTUVWXYZŽ"
#define HB_CP_UPPER "ABCČĆDĐEFGHIJKLMNOPQRSŠTUVWXYZŽ"
#define HB_CP_LOWER "abcčćdđefghijklmnopqrsštuvwxyzž"
#define HB_CP_UTF8

View File

@@ -54,7 +54,7 @@
#define HB_CP_INFO "Serbian ISO-646 (YUSCII)"
#define HB_CP_UNITB HB_UNITB_646YU
#define HB_CP_ACSORT HB_CDP_ACSORT_NONE
#define HB_CP_UPPER "ABCČĆDĐĐEFGHIJKLMNOPQRSŠTUVWXYZŽ"
#define HB_CP_UPPER "ABCČĆDĐEFGHIJKLMNOPQRSŠTUVWXYZŽ"
#define HB_CP_LOWER "abcčćdđefghijklmnopqrsštuvwxyzž"
#define HB_CP_UTF8

View File

@@ -54,8 +54,9 @@
#define HB_CP_INFO "Serbian ISO-646C (Cyrillic YUSCII)"
#define HB_CP_UNITB HB_UNITB_646YUC
#define HB_CP_ACSORT HB_CDP_ACSORT_NONE
#define HB_CP_UPPER "ABC^]D\\EFGHIJKLMNOPQRS[TUVWXYZ@"
#define HB_CP_LOWER "abc~}d|efghijklmnopqrs{tuvwxyz`"
#define HB_CP_UPPER "АБЦЧЋДЂЕФГХИЈКЛМНОПЉРСШТУВЊЏЅЗЖ"
#define HB_CP_LOWER "абцчћдђефгхијклмнопљрсштувњџѕзж"
#define HB_CP_UTF8
/* include CP registration code */
#include "hbcdpreg.h"

View File

@@ -434,10 +434,18 @@ static function genCPfile( id, info, unicode, flags, upper, lower, sort, ;
if lMixed
cDef += '#define HB_CP_CSSORT HB_CDP_CSSORT_MIXED' + EOL
endif
#ifdef __HARBOUR__
cDef += ;
'#define HB_CP_UPPER "' + hb_StrToUTF8( cUp ) + '"' + EOL + ;
'#define HB_CP_LOWER "' + hb_StrToUTF8( cLo ) + '"' + EOL + ;
'#define HB_CP_UTF8' + EOL + ;
EOL
#else
cDef += ;
'#define HB_CP_UPPER "' + cUp + '"' + EOL + ;
'#define HB_CP_LOWER "' + cLo + '"' + EOL + ;
EOL
#endif
if lWarn
cDef += ;
'#if 0 /* TOVERIFY: binary tables */' + EOL