NCBI C++ ToolKit
|
This file implements a very simple iconv. More...
#include <config.h>
#include <assert.h>
#include <ctype.h>
#include <freetds/tds.h>
#include <freetds/bytes.h>
#include <freetds/iconv.h>
#include <freetds/bool.h>
#include <freetds/utils/bjoern-utf8.h>
#include "iconv_charsets.h"
Go to the source code of this file.
Go to the SVN repository for this file.
Macros | |
#define | MASK(n) ((0xffffffffu << (n)) & 0xffffffffu) |
#define | CP1252(i, o) case o: c = i; break; |
#define | CD ((int) (TDS_INTPTR) cd) |
Typedefs | |
typedef uint32_t | ICONV_CHAR |
typedef int(* | iconv_get_t) (const unsigned char *p, size_t len, ICONV_CHAR *out) |
typedef int(* | iconv_put_t) (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
Enumerations | |
enum | ICONV_CD_VALUE { Like_to_Like = 0x100 , Like_to_Like = 0x100 } |
Functions | |
static int | get_utf8 (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_utf8 (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
static int | get_ucs4le (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_ucs4le (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
static int | get_ucs4be (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_ucs4be (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
static int | get_utf16le (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_utf16le (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
static int | get_utf16be (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_utf16be (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
static int | get_iso1 (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_iso1 (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
static int | get_ascii (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_ascii (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
static int | get_cp1252 (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_cp1252 (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
static int | get_err (const unsigned char *p, size_t len, ICONV_CHAR *out) |
static int | put_err (unsigned char *buf, size_t buf_len, ICONV_CHAR c) |
iconv_t | tds_sys_iconv_open (const char *tocode, const char *fromcode) |
Inputs are FreeTDS canonical names, no other. More... | |
int | tds_sys_iconv_close (iconv_t cd) |
size_t | tds_sys_iconv (iconv_t cd, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft) |
Variables | |
static const iconv_get_t | iconv_gets [16] |
static const iconv_put_t | iconv_puts [16] |
This file implements a very simple iconv.
Its purpose is to allow ASCII clients to communicate with Microsoft servers that encode their metadata in Unicode (UTF-16).
It supports ISO-8859-1, ASCII, CP1252, UTF-16, UCS-4 and UTF-8
Definition in file iconv.c.
#define CD ((int) (TDS_INTPTR) cd) |
|
static |
|
static |
|
static |
|
static |
Definition at line 155 of file iconv.c.
References len, out(), and TDS_GET_UA4BE.
|
static |
Definition at line 137 of file iconv.c.
References len, out(), and TDS_GET_UA4LE.
|
static |
Definition at line 212 of file iconv.c.
References len, out(), and TDS_GET_UA2BE.
|
static |
Definition at line 173 of file iconv.c.
References len, out(), and TDS_GET_UA2LE.
|
static |
Definition at line 76 of file iconv.c.
References decode_utf8(), EILSEQ, l(), len, out(), UTF8_ACCEPT, and UTF8_REJECT.
|
static |
|
static |
|
static |
|
static |
Definition at line 164 of file iconv.c.
References buf, and TDS_PUT_UA4BE.
|
static |
Definition at line 146 of file iconv.c.
References buf, and TDS_PUT_UA4LE.
|
static |
Definition at line 233 of file iconv.c.
References buf, EILSEQ, TDS_PUT_UA2BE, and TDS_UNLIKELY.
|
static |
Definition at line 194 of file iconv.c.
References buf, EILSEQ, TDS_PUT_UA2LE, and TDS_UNLIKELY.