restore 21bit unicode on windows msvc build

ecl_character is a signed type actually,
16bit signed short is not big enough to hold big charsets, such as
CP936.

this commit rolls back 74b67347.
This commit is contained in:
Yuguo Zhang 2020-02-26 11:36:34 +08:00
parent 4faac4dcb8
commit b59bbd6164
2 changed files with 7 additions and 5 deletions

View file

@ -20,9 +20,11 @@ THREADS_OBJ=
!endif !endif
!if "$(ECL_UNICODE)" != "" !if "$(ECL_UNICODE)" != ""
ECL_UNICODE_FLAG=16 ECL_UNICODE_FLAG=21
ECL_UCD_OBJ = ucd16.obj ucd16-0000.obj ucd16-0016.obj \ ECL_UCD_OBJ = ucd.obj ucd-0000.obj ucd-0016.obj \
ucd16-0032.obj ucd16-0048.obj ucd16-0064.obj ucd_names_char.obj ucd_names_codes.obj ucd_names_pair.obj ucd_names_str.obj ucd-0032.obj ucd-0048.obj ucd-0064.obj \
ucd-0080.obj ucd-0096.obj ucd_names_char.obj ucd_names_codes.obj ucd_names_pair.obj ucd_names_str.obj
!else !else
ECL_UNICODE_FLAG=0 ECL_UNICODE_FLAG=0
!endif !endif

View file

@ -154,11 +154,11 @@ typedef unsigned int cl_hashkey;
* The character type * The character type
*/ */
#ifdef ECL_UNICODE #ifdef ECL_UNICODE
#define ECL_CHAR_CODE_LIMIT 65536 /* unicode character code limit */ #define ECL_CHAR_CODE_LIMIT 1114112 /* unicode character code limit */
#else #else
#define ECL_CHAR_CODE_LIMIT 256 /* unicode character code limit */ #define ECL_CHAR_CODE_LIMIT 256 /* unicode character code limit */
#endif #endif
typedef short ecl_character; typedef int ecl_character;
typedef unsigned char ecl_base_char; typedef unsigned char ecl_base_char;
/* /*