2003-02-20 16:47:23 +01:00
|
|
|
/*
|
|
|
|
* PROGRAM: InterBase International support
|
2003-12-11 11:33:30 +01:00
|
|
|
* MODULE: cv_gb2312.h
|
2003-02-20 16:47:23 +01:00
|
|
|
* DESCRIPTION: Codeset conversion for GB2312 family codesets
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Interbase Public
|
|
|
|
* License Version 1.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy
|
|
|
|
* of the License at http://www.Inprise.com/IPL.html
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an
|
|
|
|
* "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
|
|
|
|
* or implied. See the License for the specific language governing
|
|
|
|
* rights and limitations under the License.
|
|
|
|
*
|
|
|
|
* The Original Code was created by Inprise Corporation
|
|
|
|
* and its predecessors. Portions created by Inprise Corporation are
|
|
|
|
* Copyright (C) Inprise Corporation.
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
* Contributor(s): ______________________________________.
|
|
|
|
*/
|
|
|
|
|
2003-12-11 11:33:30 +01:00
|
|
|
/* These macros have a duplicate in lc_gb2312.cpp */
|
2003-02-20 16:47:23 +01:00
|
|
|
#define GB1(uc) ((UCHAR)((uc)&0xff)>=0xa1 && \
|
|
|
|
(UCHAR)((uc)&0xff)<=0xfe) /* GB2312 1st-byte */
|
|
|
|
#define GB2(uc) ((UCHAR)((uc)&0xff)>=0xa1 && \
|
|
|
|
(UCHAR)((uc)&0xff)<=0xfe) /* GB2312 2nd-byte */
|
|
|
|
|
2005-05-28 00:45:31 +02:00
|
|
|
ULONG CVGB_gb2312_to_unicode(csconvert* obj, ULONG src_len, const UCHAR* src_ptr,
|
2007-10-05 16:37:33 +02:00
|
|
|
ULONG dest_len, UCHAR *dest_ptr,
|
2005-05-28 00:45:31 +02:00
|
|
|
USHORT *err_code, ULONG *err_position);
|
2003-02-20 16:47:23 +01:00
|
|
|
|
2007-10-05 16:37:33 +02:00
|
|
|
ULONG CVGB_unicode_to_gb2312(csconvert* obj, ULONG unicode_len, const UCHAR* unicode_str,
|
|
|
|
ULONG gb_len, UCHAR *gb_str,
|
2005-05-28 00:45:31 +02:00
|
|
|
USHORT *err_code, ULONG *err_position);
|
2003-12-11 11:33:30 +01:00
|
|
|
|
2005-05-28 00:45:31 +02:00
|
|
|
INTL_BOOL CVGB_check_gb2312(charset* cs, ULONG gb_len, const UCHAR* gb_str, ULONG* offending_position);
|