Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

charconv_win32.c File Reference

Character set conversion using Win32 MultiByte function + libjcode. More...

#include <sent/stddefs.h>
#include <windows.h>
#include <winnls.h>
#include <jlib.h>

Include dependency graph for charconv_win32.c:

Go to the source code of this file.

Defines

#define UNICODE_BUFFER_SIZE   4096
 Buffer length to use for unicode conversion.

Functions

boolean charconv_win32_setup (char *fromcode, char *tocode, boolean *enable_conv)
char * charconv_win32 (char *instr, char *outstr, int maxoutlen)

Variables

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.


Detailed Description

Character set conversion using Win32 MultiByte function + libjcode.

Author:
Akinobu LEE
Date:
Thu Feb 17 16:02:41 2005
Perform character set conversion using Windows native API WideCharToMultiByte() and MultiByteToWideChar(). Conversion between codepages of "ansi" "oem" "mac" "utf-7" "utf-8" or codepage number supported at the running OS are supported using unicode.

Conversion from Japanese-euc ("euc-jp") is optionally supported by the libjcode library.

Revision
1.1.1.1

Definition in file charconv_win32.c.


Function Documentation

boolean charconv_win32_setup char *  fromcode,
char *  tocode,
boolean enable_conv
 

Setup charset conversion for win32.

Parameters:
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
Returns:
TRUE on success, FALSE on failure (unknown codename or unsupported codepage).

Definition at line 67 of file charconv_win32.c.

Referenced by j_printf_set_charconv().

char* charconv_win32 char *  instr,
char *  outstr,
int  maxoutlen
 

Apply charset conversion to a string using win32 functions

Parameters:
instr [in] source string
outstr [in] destination buffer
maxoutlen [in] allocated length of outstr in byte.
Returns:
either of instr or outstr, that holds the result string.

Definition at line 203 of file charconv_win32.c.

Referenced by charconv().


Generated on Tue Mar 28 16:03:33 2006 for Julius by  doxygen 1.4.2