#include "app.h"
#include <windows.h>
#include <winnls.h>
#include "libjcode/jlib.h"
マクロ定義 | |
| #define | UNICODE_BUFFER_SIZE 4096 |
| Buffer length to use for unicode conversion | |
関数 | |
| boolean | charconv_win32_setup (char *fromcode, char *tocode, boolean *enable_conv) |
| Setup charset conversion for win32. | |
| char * | charconv_win32 (char *instr, char *outstr, int maxoutlen) |
| Apply charset conversion to a string using win32 functions | |
変数 | |
| static boolean | euctosjis = FALSE |
| TRUE if use libjcode for euc->sjis conv. | |
| static boolean | only_euc_conv = FALSE |
| Perform only euc->sjis | |
| static unsigned int | from_cp |
| Source codepage | |
| static unsigned int | to_cp |
| Target codepage | |
| static wchar_t | unibuf [UNICODE_BUFFER_SIZE] |
| Local work area for unicode conversion | |
Windows の WideCharToMultiByte() および MultiByteToWideChar() を 使用した文字コード変換を行う. "ansi" "oem" "mac" "utf-7" "utf-8" あるいは 任意のコードページ番号間の変換を,unicode を介して行う.
Windows では EUC のコードページに対応していないので,変換元の文字コードが euc-jp のときは,libjcode で SJIS に変換してからunicodeへ変換する.
charconv_win32.c で定義されています。
Setup charset conversion for win32.
| fromcode | [in] input charset code name or codepage number string, NULL invalid | |
| tocode | [in] output charset code name or codepage number string, or NULL when disable conversion | |
| enable_conv | [out] store whether conversion should be enabled or not |
charconv_win32.c の 68 行で定義されています。
| char* charconv_win32 | ( | char * | instr, | |
| char * | outstr, | |||
| int | maxoutlen | |||
| ) |
Apply charset conversion to a string using win32 functions
| instr | [in] source string | |
| outstr | [in] destination buffer | |
| maxoutlen | [in] allocated length of outstr in byte. |
charconv_win32.c の 204 行で定義されています。
参照元 charconv().
1.5.1