FreeTDS API
iconv_charsets.h
1 /*
2  * Autogenerated file.
3  * Generated by iconv_charsets.pl
4  */
5 
6 #define CP1252_ALL \
7  CP1252(0x80, 8364) \
8  CP1252(0x82, 8218) \
9  CP1252(0x83, 402) \
10  CP1252(0x84, 8222) \
11  CP1252(0x85, 8230) \
12  CP1252(0x86, 8224) \
13  CP1252(0x87, 8225) \
14  CP1252(0x88, 710) \
15  CP1252(0x89, 8240) \
16  CP1252(0x8a, 352) \
17  CP1252(0x8b, 8249) \
18  CP1252(0x8c, 338) \
19  CP1252(0x8e, 381) \
20  CP1252(0x91, 8216) \
21  CP1252(0x92, 8217) \
22  CP1252(0x93, 8220) \
23  CP1252(0x94, 8221) \
24  CP1252(0x95, 8226) \
25  CP1252(0x96, 8211) \
26  CP1252(0x97, 8212) \
27  CP1252(0x98, 732) \
28  CP1252(0x99, 8482) \
29  CP1252(0x9a, 353) \
30  CP1252(0x9b, 8250) \
31  CP1252(0x9c, 339) \
32  CP1252(0x9e, 382) \
33  CP1252(0x9f, 376)
34 
35 static const uint16_t cp1252_0080_00a0[] = {
36  0x20ac,
37  0x81,
38  0x201a,
39  0x192,
40  0x201e,
41  0x2026,
42  0x2020,
43  0x2021,
44  0x2c6,
45  0x2030,
46  0x160,
47  0x2039,
48  0x152,
49  0x8d,
50  0x17d,
51  0x8f,
52  0x90,
53  0x2018,
54  0x2019,
55  0x201c,
56  0x201d,
57  0x2022,
58  0x2013,
59  0x2014,
60  0x2dc,
61  0x2122,
62  0x161,
63  0x203a,
64  0x153,
65  0x9d,
66  0x17e,
67  0x178,
68 };
69 
70 TDS_COMPILE_CHECK(cp1252size, sizeof(cp1252_0080_00a0) == 0x20*sizeof(uint16_t));
tds_login::user_name
DSTR user_name
account for login
Definition: tds.h:529
tds.h
tds_set_iconv_name
static const char * tds_set_iconv_name(int charset)
Get iconv name given canonic.
Definition: iconv.c:197
tds_iconv_alloc
int tds_iconv_alloc(TDSCONNECTION *conn)
Allocate iconv stuff.
Definition: iconv.c:266
tds_packet
Definition: tds.h:1055
tds_login::server_charset
DSTR server_charset
charset of server e.g.
Definition: tds.h:518
tds_error_message
Definition: util.c:222
skip_one_input_sequence
static size_t skip_one_input_sequence(iconv_t cd, const TDS_ENCODING *charset, const char **input, size_t *input_size)
Move the input sequence pointer to the next valid position.
Definition: iconv.c:824
tdsdump_log
void tdsdump_log(const char *file, unsigned int level_line, const char *fmt,...)
Write a message to the debug log.
Definition: log.c:354
tds_socket::cur_cursor
TDSCURSOR * cur_cursor
cursor in use
Definition: tds.h:1199
tdsiconvdir
Definition: iconv.h:84
tds_flush_packet
TDSRET tds_flush_packet(TDSSOCKET *tds)
Flush packet to server.
Definition: write.c:285
tds_process_simple_query
TDSRET tds_process_simple_query(TDSSOCKET *tds)
Process results for simple query as "SET TEXTSIZE" or "USE dbname" If the statement returns results,...
Definition: token.c:876
TDS_PENDING
@ TDS_PENDING
cilent is waiting for data
Definition: tds.h:794
tds_encoding::canonic
unsigned char canonic
internal numeric index into array of all encodings
Definition: tds.h:619
tdsiconvinfo
Definition: iconv.h:91
tds_set_state
TDS_STATE tds_set_state(TDSSOCKET *tds, TDS_STATE state)
Set state of TDS connection, with logging and checking.
Definition: util.c:58
tds_socket::in_len
unsigned in_len
input buffer length
Definition: tds.h:1170
tds_dstr_isempty
static int tds_dstr_isempty(const DSTR *s)
test if string is empty
Definition: string.h:60
tds_message
Definition: tds.h:876
tds_errno_message_flags
Definition: iconv.h:78
tds_iconv
size_t tds_iconv(TDSSOCKET *tds, TDSICONV *conv, TDS_ICONV_DIRECTION io, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Wrapper around iconv(3).
Definition: iconv.c:551
tds_iconv_get_info
static TDSICONV * tds_iconv_get_info(TDSCONNECTION *conn, int canonic_client, int canonic_server)
Get a iconv info structure, allocate and initialize if needed.
Definition: iconv.c:716
tds_addrinfo
Definition: replacements.h:88
tds_connection::env
TDSENV env
environment is shared between all sessions
Definition: tds.h:1080
TDS_DEAD
@ TDS_DEAD
no connection
Definition: tds.h:796
TDS_READING
@ TDS_READING
client is reading data
Definition: tds.h:795
tds_login::server_name
DSTR server_name
server name (in freetds.conf)
Definition: tds.h:513
tds_env::block_size
int block_size
packet size (512-65535)
Definition: tds.h:966
tds_dstr_cstr
static const char * tds_dstr_cstr(const DSTR *s)
Returns a C version (NUL terminated string) of dstr.
Definition: string.h:78
tds_socket::in_flag
unsigned char in_flag
input buffer type
Definition: tds.h:1171
TDS_STATE
enum tds_states TDS_STATE
values for tds->state
tds_send_cancel
TDSRET tds_send_cancel(TDSSOCKET *tds)
tds_send_cancel() sends an empty packet (8 byte header only) tds_process_cancel should be called dire...
Definition: query.c:2123
tds_pool_user
Definition: pool.h:76
tds_strndup
char * tds_strndup(const void *s, TDS_INTPTR len)
Copy a string of length len to a new allocated buffer This function does not read more than len bytes...
Definition: util.c:394
tds_encoding
Information relevant to libiconv.
Definition: tds.h:612
tds_read_packet
int tds_read_packet(TDSSOCKET *tds)
Read in one 'packet' from the server.
Definition: packet.c:531
tds_iconv_init
static int tds_iconv_init(void)
Initialize charset searching for UTF-8, UCS-2 and ISO8859-1.
Definition: iconv.c:80
tds_socket::rows_affected
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
Definition: tds.h:1209
tds_pool::waiters
dlist_users waiters
users in wait state
Definition: pool.h:128
TDS_IDLE
@ TDS_IDLE
no data expected
Definition: tds.h:791
TDS_SENDING
@ TDS_SENDING
client would send data
Definition: tds.h:793
tds_socket::in_pos
unsigned in_pos
current position in in_buf
Definition: tds.h:1168
tds_canonical_charset_name
const char * tds_canonical_charset_name(const char *charset_name)
Determine canonical iconv character set name.
Definition: iconv.c:958
tds_iconv_info_init
static int tds_iconv_info_init(TDSICONV *char_conv, int client_canonic, int server_canonic)
Open iconv descriptors to convert between character sets (both directions).
Definition: iconv.c:403
tds_canonical_charset
static int tds_canonical_charset(const char *charset_name)
Determine canonical iconv character set.
Definition: iconv.c:939
END_LOGIN_EVENT
Definition: user.c:523
tds_sys_iconv_open
iconv_t tds_sys_iconv_open(const char *tocode, const char *fromcode)
Inputs are FreeTDS canonical names, no other.
Definition: iconv.c:344
tds_iconv_from_collate
TDSICONV * tds_iconv_from_collate(TDSCONNECTION *conn, TDS_UCHAR collate[5])
Get iconv information from a LCID (to support different column encoding under MSSQL2K)
Definition: iconv.c:1210
tds_socket::in_buf
unsigned char * in_buf
Input buffer.
Definition: tds.h:1154
tds_connection::product_version
TDS_UINT product_version
version of product (Sybase/MS and full version)
Definition: tds.h:1072
tds_pool
Definition: pool.h:104
tds_socket::out_flag
unsigned char out_flag
output buffer type
Definition: tds.h:1172
tds_pool_socket
Definition: pool.h:69
TDS_WRITING
@ TDS_WRITING
client is writing data
Definition: tds.h:792
tdserror
int tdserror(const TDSCONTEXT *tds_ctx, TDSSOCKET *tds, int msgno, int errnum)
Call the client library's error handler (for library-generated errors only)
Definition: util.c:307
tds_socket_set_nonblocking
int tds_socket_set_nonblocking(TDS_SYS_SOCKET sock)
Set socket to non-blocking.
Definition: net.c:168
tds_login::password
DSTR password
password of account login
Definition: tds.h:530
tds_socket
Information for a server connection.
Definition: tds.h:1141
tds_env::charset
char * charset
character set encoding
Definition: tds.h:969
LOGIN_EVENT
Definition: user.c:100
tds_pool_member
Definition: pool.h:85
tds_encoding::name
const char * name
name of the encoding (ie UTF-8)
Definition: tds.h:615
tds_context
Definition: tds.h:1029
tds_quote_id
size_t tds_quote_id(TDSSOCKET *tds, char *buffer, const char *id, int idlen)
Quote an id.
Definition: query.c:2266
tds_login
Definition: tds.h:511
tds_pool_event
Definition: pool.h:63
_character_set_alias
Definition: iconv.h:72
tdsdump_dump_buf
void tdsdump_dump_buf(const char *file, unsigned int level_line, const char *msg, const void *buf, size_t length)
Dump the contents of data into the log file in a human readable format.
Definition: log.c:256
tds_connection
Definition: tds.h:1069
tds_submit_query
TDSRET tds_submit_query(TDSSOCKET *tds, const char *query)
Sends a language string to the database server for processing.
Definition: query.c:207