Separate sj4charset
This commit is contained in:
parent
666f3b433b
commit
a76707537f
9 changed files with 381 additions and 340 deletions
15
include/sj4charset/sj_charset.h
Normal file
15
include/sj4charset/sj_charset.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#ifndef __SJ_CHARSET_H__
|
||||
#define __SJ_CHARSET_H__
|
||||
|
||||
#include <sj_types.h>
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
int sj4_from_sjis(u_char* out, const u_char* in, int len);
|
||||
int sj4_from_utf8(u_char* out, const u_char* in, int len);
|
||||
int sj4_from_utf16(u_char* out, const u_char* in, int len);
|
||||
int sj4_to_sjis(u_char* out, const u_char* in, int len);
|
||||
int sj4_to_utf8(u_char* out, const u_char* in, int len);
|
||||
int sj4_to_utf16(u_char* out, const u_char* in, int len);
|
||||
|
||||
#endif
|
||||
27
include/sj4charset/sj_euc2ucs.h
Normal file
27
include/sj4charset/sj_euc2ucs.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef __SJ_EUC2UCS_H__
|
||||
#define __SJ_EUC2UCS_H__
|
||||
|
||||
/*
|
||||
* file:euc_jp_to_utf16_table.h
|
||||
*/
|
||||
/*
|
||||
# EUC-JP Unicode
|
||||
# Character Code Mappings
|
||||
# <EUC-JP>
|
||||
# <制御コード>0x00~0x1f, 0x7f</制御コード>
|
||||
# <ASCII文字>0x20~0x7e</ASCII文字>
|
||||
# <半角カタカナ>0x8ea1~0x8edf</半角カタカナ>
|
||||
# <漢字>0xa1a1~0xf4a6, 0x8fa2af~0x8fede3<漢字>
|
||||
# </EUC-JP>
|
||||
*/
|
||||
struct _E2U_BITMAP_INDEX {
|
||||
unsigned char byType; /* 1:isEmpty 2:BitmapIndex 3:Data */
|
||||
unsigned long dwBitmapIndex; /* BitmapIndexへのポインタ(0の場合はBitmapIndexが存在しない) */
|
||||
unsigned long dwEucJpCode; /* EUC_JP コード(未知の場合には0) */
|
||||
unsigned long dwUtf16Code; /* UTF16コード(未知の場合には0) */
|
||||
};
|
||||
typedef struct _E2U_BITMAP_INDEX T_E2U_BITMAP_INDEX;
|
||||
|
||||
extern const T_E2U_BITMAP_INDEX euc_jp_to_utf16_table[];
|
||||
|
||||
#endif
|
||||
27
include/sj4charset/sj_ucs2euc.h
Normal file
27
include/sj4charset/sj_ucs2euc.h
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#ifndef __SJ_UCS2EUC_H__
|
||||
#define __SJ_UCS2EUC_H__
|
||||
|
||||
/*
|
||||
* file:utf16_to_euc_jp_table.h
|
||||
*/
|
||||
/*
|
||||
# Unicode EUC-JP
|
||||
# Character Code Mappings
|
||||
# <EUC-JP>
|
||||
# <制御コード>0x00~0x1f, 0x7f</制御コード>
|
||||
# <ASCII文字>0x20~0x7e</ASCII文字>
|
||||
# <半角カタカナ>0x8ea1~0x8edf</半角カタカナ>
|
||||
# <漢字>0xa1a1~0xf4a6, 0x8fa2af~0x8fede3<漢字>
|
||||
# </EUC-JP>
|
||||
*/
|
||||
struct _U2E_BITMAP_INDEX {
|
||||
unsigned char byType; /* 1:isEmpty 2:BitmapIndex 3:Data */
|
||||
unsigned long dwBitmapIndex; /* BitmapIndexへのポインタ(0の場合はBitmapIndexが存在しない) */
|
||||
unsigned long dwEucJpCode; /* EUC_JP コード(未知の場合には0) */
|
||||
unsigned long dwUtf16Code; /* UTF16コード(未知の場合には0) */
|
||||
};
|
||||
typedef struct _U2E_BITMAP_INDEX T_U2E_BITMAP_INDEX;
|
||||
|
||||
extern const T_U2E_BITMAP_INDEX utf16_to_euc_jp_table[];
|
||||
|
||||
#endif
|
||||
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue