2008-02-02 02:13 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
* include/hbapicdp.h
* common.mak
* source/codepage/Makefile
+ source/codepage/uc1252.c
+ source/codepage/cpdewin.c
+ source/codepage/cpruiso.c
+ Added RUISO (Russian ISO-8859-5) and DEWIN (German CP1252, actually
identical to DEISO) codepages and a CP1252<->Unicode table.
Borrowed from Phil Krylov (xhb).
This commit is contained in:
@@ -8,6 +8,17 @@
|
||||
2002-12-01 13:30 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-02-02 02:13 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
|
||||
* include/hbapicdp.h
|
||||
* common.mak
|
||||
* source/codepage/Makefile
|
||||
+ source/codepage/uc1252.c
|
||||
+ source/codepage/cpdewin.c
|
||||
+ source/codepage/cpruiso.c
|
||||
+ Added RUISO (Russian ISO-8859-5) and DEWIN (German CP1252, actually
|
||||
identical to DEISO) codepages and a CP1252<->Unicode table.
|
||||
Borrowed from Phil Krylov (xhb).
|
||||
|
||||
2008-02-01 17:35 UTC+0100 Ryszard Glab (harbour/at/rglab.pl)
|
||||
* config/lib.cf
|
||||
* fixed to correctly list the source of installed library
|
||||
|
||||
@@ -766,6 +766,7 @@ CODEPAGE_LIB_OBJS = \
|
||||
$(OBJ_DIR)\cpcswin$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpde850$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpdeiso$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpdewin$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpel737$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpelwin$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpes850$(OBJEXT) \
|
||||
@@ -793,6 +794,7 @@ CODEPAGE_LIB_OBJS = \
|
||||
$(OBJ_DIR)\cppt850$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpptiso$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpru866$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpruiso$(OBJEXT) \
|
||||
$(OBJ_DIR)\cprukoi$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpruwin$(OBJEXT) \
|
||||
$(OBJ_DIR)\cpsk852$(OBJEXT) \
|
||||
@@ -814,6 +816,7 @@ CODEPAGE_LIB_OBJS = \
|
||||
$(OBJ_DIR)\cpuawin$(OBJEXT) \
|
||||
$(OBJ_DIR)\uc1250$(OBJEXT) \
|
||||
$(OBJ_DIR)\uc1251$(OBJEXT) \
|
||||
$(OBJ_DIR)\uc1252$(OBJEXT) \
|
||||
$(OBJ_DIR)\uc1253$(OBJEXT) \
|
||||
$(OBJ_DIR)\uc1254$(OBJEXT) \
|
||||
$(OBJ_DIR)\uc1257$(OBJEXT) \
|
||||
|
||||
@@ -121,6 +121,7 @@ typedef struct _HB_CODEPAGE
|
||||
#define HB_CPID_866 "cp866"
|
||||
#define HB_CPID_1250 "cp1250"
|
||||
#define HB_CPID_1251 "cp1251"
|
||||
#define HB_CPID_1252 "cp1252"
|
||||
#define HB_CPID_1253 "cp1253"
|
||||
#define HB_CPID_1254 "cp1254"
|
||||
#define HB_CPID_1257 "cp1257"
|
||||
@@ -141,6 +142,7 @@ typedef struct _HB_CODEPAGE
|
||||
#define HB_UNITB_866 &hb_uniTbl_866
|
||||
#define HB_UNITB_1250 &hb_uniTbl_1250
|
||||
#define HB_UNITB_1251 &hb_uniTbl_1251
|
||||
#define HB_UNITB_1252 &hb_uniTbl_1252
|
||||
#define HB_UNITB_1253 &hb_uniTbl_1253
|
||||
#define HB_UNITB_1254 &hb_uniTbl_1254
|
||||
#define HB_UNITB_1257 &hb_uniTbl_1257
|
||||
@@ -163,6 +165,7 @@ extern HB_UNITABLE hb_uniTbl_857;
|
||||
extern HB_UNITABLE hb_uniTbl_866;
|
||||
extern HB_UNITABLE hb_uniTbl_1250;
|
||||
extern HB_UNITABLE hb_uniTbl_1251;
|
||||
extern HB_UNITABLE hb_uniTbl_1252;
|
||||
extern HB_UNITABLE hb_uniTbl_1253;
|
||||
extern HB_UNITABLE hb_uniTbl_1254;
|
||||
extern HB_UNITABLE hb_uniTbl_1257;
|
||||
|
||||
@@ -15,6 +15,7 @@ C_SOURCES=\
|
||||
cpcswin.c \
|
||||
cpde850.c \
|
||||
cpdeiso.c \
|
||||
cpdewin.c \
|
||||
cpel737.c \
|
||||
cpelwin.c \
|
||||
cpes850.c \
|
||||
@@ -42,6 +43,7 @@ C_SOURCES=\
|
||||
cppt850.c \
|
||||
cpptiso.c \
|
||||
cpru866.c \
|
||||
cpruiso.c \
|
||||
cprukoi.c \
|
||||
cpruwin.c \
|
||||
cpsk852.c \
|
||||
@@ -63,6 +65,7 @@ C_SOURCES=\
|
||||
cpuawin.c \
|
||||
uc1250.c \
|
||||
uc1251.c \
|
||||
uc1252.c \
|
||||
uc1253.c \
|
||||
uc1254.c \
|
||||
uc1257.c \
|
||||
|
||||
106
harbour/source/codepage/cpdewin.c
Normal file
106
harbour/source/codepage/cpdewin.c
Normal file
@@ -0,0 +1,106 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* National Collation Support Module ( German WIN )
|
||||
*
|
||||
* Copyright 2002 Alexander S.Kresin <alex@belacy.belgorod.su>
|
||||
* www - http://www.harbour-project.org
|
||||
* v1.0 2003 Guenther Steiner <byte-one@aon.at>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Language name: German */
|
||||
/* ISO language code (2 chars): DE (please look it up in /doc/lang_id.txt) */
|
||||
/* Codepage: Windows-1252 */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
#define NUMBER_OF_CHARACTERS 30 /* The number of single characters in the
|
||||
alphabet, two-as-one aren't considered
|
||||
here, accented - are considered. */
|
||||
#define IS_LATIN 1 /* Should be 1, if the national alphabet
|
||||
is based on Latin */
|
||||
#define ACCENTED_EQUAL 0 /* Should be 1, if accented character
|
||||
has the same weight as appropriate
|
||||
unaccented. */
|
||||
#define ACCENTED_INTERLEAVED 0 /* Should be 1, if accented characters
|
||||
sort after their unaccented counterparts
|
||||
only if the unaccented versions of all
|
||||
characters being compared are the same
|
||||
( interleaving ) */
|
||||
|
||||
/* If ACCENTED_EQUAL or ACCENTED_INTERLEAVED is 1, you need to mark the
|
||||
accented characters with the symbol '~' before each of them, for example:
|
||||
a~á
|
||||
If there is two-character sequence, which is considered as one, it should
|
||||
be marked with '.' before and after it, for example:
|
||||
... h.ch.i ...
|
||||
|
||||
The Upper case string and the Lower case string should be absolutely the
|
||||
same excepting the characters case, of course.
|
||||
*/
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "DEWIN",
|
||||
HB_CPID_1252, HB_UNITB_1252, NUMBER_OF_CHARACTERS,
|
||||
"AÄBCDEFGHIJKLMNOÖPQRSßTUÜVWXYZ",
|
||||
"aäbcdefghijklmnoöpqrsßtuüvwxyz",
|
||||
IS_LATIN, ACCENTED_EQUAL, ACCENTED_INTERLEAVED, 0, 0, NULL, NULL, NULL, NULL, 0, NULL };
|
||||
|
||||
HB_CODEPAGE_INIT( DEWIN )
|
||||
|
||||
#if defined(HB_PRAGMA_STARTUP)
|
||||
#pragma startup hb_codepage_Init_DEWIN
|
||||
#elif defined(HB_MSC_STARTUP)
|
||||
#if _MSC_VER >= 1010
|
||||
#pragma data_seg( ".CRT$XIY" )
|
||||
#pragma comment( linker, "/Merge:.CRT=.data" )
|
||||
#else
|
||||
#pragma data_seg( "XIY" )
|
||||
#endif
|
||||
static HB_$INITSYM hb_vm_auto_hb_codepage_Init_DEWIN = hb_codepage_Init_DEWIN;
|
||||
#pragma data_seg()
|
||||
#endif
|
||||
80
harbour/source/codepage/cpruiso.c
Normal file
80
harbour/source/codepage/cpruiso.c
Normal file
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* Harbour Project source code:
|
||||
* National Collation Support Module (RUISO)
|
||||
*
|
||||
* Copyright 2002 Alexander S.Kresin <alex@belacy.belgorod.su>
|
||||
* www - http://www.harbour-project.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
/* Language name: Russian */
|
||||
/* ISO language code (2 chars): RU */
|
||||
/* Codepage: ISO-8859-5 */
|
||||
|
||||
#include <ctype.h>
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
static HB_CODEPAGE s_codepage = { "RUISO",
|
||||
HB_CPID_8859_5, HB_UNITB_8859_5, 36,
|
||||
"°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ¡¤§®",
|
||||
"ÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæçèéêëìíîïñô÷þ",
|
||||
0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL };
|
||||
|
||||
HB_CODEPAGE_INIT( RUISO )
|
||||
|
||||
#if defined(HB_PRAGMA_STARTUP)
|
||||
#pragma startup hb_codepage_Init_RUISO
|
||||
#elif defined(HB_MSC_STARTUP)
|
||||
#if _MSC_VER >= 1010
|
||||
#pragma data_seg( ".CRT$XIY" )
|
||||
#pragma comment( linker, "/Merge:.CRT=.data" )
|
||||
#else
|
||||
#pragma data_seg( "XIY" )
|
||||
#endif
|
||||
static HB_$INITSYM hb_vm_auto_hb_codepage_Init_RUISO = hb_codepage_Init_RUISO;
|
||||
#pragma data_seg()
|
||||
#endif
|
||||
92
harbour/source/codepage/uc1252.c
Normal file
92
harbour/source/codepage/uc1252.c
Normal file
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* $Id$
|
||||
*/
|
||||
|
||||
/*
|
||||
* xHarbour Project source code:
|
||||
*
|
||||
* Copyright 2003 Przemyslaw Czerpak <druzus@acn.waw.pl>
|
||||
* www - http://www.xharbour.org
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
* Boston, MA 02111-1307 USA (or visit the web site http://www.gnu.org/).
|
||||
*
|
||||
* As a special exception, the Harbour Project gives permission for
|
||||
* additional uses of the text contained in its release of Harbour.
|
||||
*
|
||||
* The exception is that, if you link the Harbour libraries with other
|
||||
* files to produce an executable, this does not by itself cause the
|
||||
* resulting executable to be covered by the GNU General Public License.
|
||||
* Your use of that executable is in no way restricted on account of
|
||||
* linking the Harbour library code into it.
|
||||
*
|
||||
* This exception does not however invalidate any other reasons why
|
||||
* the executable file might be covered by the GNU General Public License.
|
||||
*
|
||||
* This exception applies only to the code released by the Harbour
|
||||
* Project under the name Harbour. If you copy code from other
|
||||
* Harbour Project or Free Software Foundation releases into a copy of
|
||||
* Harbour, as the General Public License permits, the exception does
|
||||
* not apply to the code that you add in this way. To avoid misleading
|
||||
* anyone as to the status of such modified files, you must delete
|
||||
* this exception notice from them.
|
||||
*
|
||||
* If you write modifications of your own for Harbour, it is your choice
|
||||
* whether to permit this exception to apply to your modifications.
|
||||
* If you do not wish that, delete this exception notice.
|
||||
*
|
||||
*/
|
||||
|
||||
#include "hbapi.h"
|
||||
#include "hbapicdp.h"
|
||||
|
||||
#define NUMBER_OF_CHARS 256
|
||||
|
||||
static USHORT uniCodes[NUMBER_OF_CHARS] = {
|
||||
0x0020, 0x263A, 0x263B, 0x2665, 0x2666, 0x2663, 0x2660, 0x2022,
|
||||
0x25D8, 0x25CB, 0x25D9, 0x2642, 0x2640, 0x266A, 0x266B, 0x263C,
|
||||
0x25BA, 0x25C4, 0x2195, 0x203C, 0x00B6, 0x00A7, 0x25AC, 0x21A8,
|
||||
0x2191, 0x2193, 0x2192, 0x2190, 0x2319, 0x2194, 0x25B2, 0x25BC,
|
||||
0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027,
|
||||
0x0028, 0x0029, 0x002A, 0x002B, 0x002C, 0x002D, 0x002E, 0x002F,
|
||||
0x0030, 0x0031, 0x0032, 0x0033, 0x0034, 0x0035, 0x0036, 0x0037,
|
||||
0x0038, 0x0039, 0x003A, 0x003B, 0x003C, 0x003D, 0x003E, 0x003F,
|
||||
0x0040, 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047,
|
||||
0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F,
|
||||
0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057,
|
||||
0x0058, 0x0059, 0x005A, 0x005B, 0x005C, 0x005D, 0x005E, 0x005F,
|
||||
0x0060, 0x0061, 0x0062, 0x0063, 0x0064, 0x0065, 0x0066, 0x0067,
|
||||
0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006E, 0x006F,
|
||||
0x0070, 0x0071, 0x0072, 0x0073, 0x0074, 0x0075, 0x0076, 0x0077,
|
||||
0x0078, 0x0079, 0x007A, 0x007B, 0x007C, 0x007D, 0x007E, 0x007F,
|
||||
0x20AC, 0x0000, 0x201A, 0x0192, 0x201E, 0x2026, 0x2020, 0x2021,
|
||||
0x02C6, 0x2030, 0x0160, 0x2039, 0x0152, 0x0000, 0x017D, 0x0000,
|
||||
0x0000, 0x2018, 0x2019, 0x201C, 0x201D, 0x2022, 0x2013, 0x2014,
|
||||
0x02DC, 0x2122, 0x0161, 0x203A, 0x0153, 0x0000, 0x017E, 0x0178,
|
||||
0x00A0, 0x00A1, 0x00A2, 0x00A3, 0x00A4, 0x00A5, 0x00A6, 0x00A7,
|
||||
0x00A8, 0x00A9, 0x00AA, 0x00AB, 0x00AC, 0x00AD, 0x00AE, 0x00AF,
|
||||
0x00B0, 0x00B1, 0x00B2, 0x00B3, 0x00B4, 0x00B5, 0x00B6, 0x00B7,
|
||||
0x00B8, 0x00B9, 0x00BA, 0x00BB, 0x00BC, 0x00BD, 0x00BE, 0x00BF,
|
||||
0x00C0, 0x00C1, 0x00C2, 0x00C3, 0x00C4, 0x00C5, 0x00C6, 0x00C7,
|
||||
0x00C8, 0x00C9, 0x00CA, 0x00CB, 0x00CC, 0x00CD, 0x00CE, 0x00CF,
|
||||
0x00D0, 0x00D1, 0x00D2, 0x00D3, 0x00D4, 0x00D5, 0x00D6, 0x00D7,
|
||||
0x00D8, 0x00D9, 0x00DA, 0x00DB, 0x00DC, 0x00DD, 0x00DE, 0x00DF,
|
||||
0x00E0, 0x00E1, 0x00E2, 0x00E3, 0x00E4, 0x00E5, 0x00E6, 0x00E7,
|
||||
0x00E8, 0x00E9, 0x00EA, 0x00EB, 0x00EC, 0x00ED, 0x00EE, 0x00EF,
|
||||
0x00F0, 0x00F1, 0x00F2, 0x00F3, 0x00F4, 0x00F5, 0x00F6, 0x00F7,
|
||||
0x00F8, 0x00F9, 0x00FA, 0x00FB, 0x00FC, 0x00FD, 0x00FE, 0x00FF,
|
||||
};
|
||||
|
||||
HB_UNITABLE hb_uniTbl_1252 = { HB_CPID_1252, NUMBER_OF_CHARS, FALSE, uniCodes };
|
||||
Reference in New Issue
Block a user