FreeTDS API: src/replacements/iconv_charsets.h Source File

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_staticout_stream
output stream to write data to a static buffer.
Definition: stream.h:92
tmp_col_struct
Definition: stream.c:44
tds_freeze::pkt
TDSPACKET * pkt
first packet frozen
Definition: tds.h:1575
tds_datain_stream_read
static int tds_datain_stream_read(TDSINSTREAM *stream, void *ptr, size_t len)
Reads data from network for input stream.
Definition: stream.c:185
tds_socket::frozen_packets
TDSPACKET * frozen_packets
list of packets frozen, points to first one.
Definition: tds.h:1203
tds_env::charset
char * charset
character set encoding
Definition: tds.h:968
tds_packet
Definition: tds.h:1057
tds_dynamic_stream_write
static int tds_dynamic_stream_write(TDSOUTSTREAM *stream, size_t len)
Writes data to a dynamic allocated buffer.
Definition: stream.c:324
tds_pool
Definition: pool.h:105
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_READING
@ TDS_READING
client is reading data
Definition: tds.h:794
tds_iconv_alloc
int tds_iconv_alloc(TDSCONNECTION *conn)
Allocate iconv stuff.
Definition: iconv.c:307
tds_output_stream::buffer
char * buffer
write buffer.
Definition: stream.h:50
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_login::password
DSTR password
password of account login
Definition: tds.h:535
tds_socket::in_pos
unsigned in_pos
current position in in_buf
Definition: tds.h:1192
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:1245
tds.h
Main include file for libtds.
tds_connection::env
TDSENV env
environment is shared between all sessions
Definition: tds.h:1101
tds_input_stream::read
int(* read)(struct tds_input_stream *stream, void *ptr, size_t len)
read some data Return 0 if end of stream Return <0 if error (actually not defined)
Definition: stream.h:35
tds_dstr_isempty
static int tds_dstr_isempty(const DSTR *s)
test if string is empty
Definition: string.h:60
tds_staticout_stream_write
static int tds_staticout_stream_write(TDSOUTSTREAM *stream, size_t len)
Writes data to a static allocated buffer.
Definition: stream.c:298
tds_staticin_stream
input stream to read data from a static buffer
Definition: stream.h:81
tdsiconvdir
Definition: iconv.h:85
tds_dataout_stream
output stream to write data to tds protocol
Definition: stream.h:72
tds_encoding::canonic
unsigned char canonic
internal numeric index into array of all encodings
Definition: tds.h:624
tds_socket::out_buf
unsigned char * out_buf
Output buffer.
Definition: tds.h:1185
tds_socket_set_nonblocking
int tds_socket_set_nonblocking(TDS_SYS_SOCKET sock)
Set socket to non-blocking.
Definition: net.c:168
tds_freeze_abort
TDSRET tds_freeze_abort(TDSFREEZE *freeze)
Discard all data written after the freeze.
Definition: packet.c:961
TDS_STATE
enum tds_states TDS_STATE
values for tds->state
tds_connection::product_version
TDS_UINT product_version
version of product (Sybase/MS and full version)
Definition: tds.h:1093
tds_pool_member
Definition: pool.h:86
tds_set_column_type
void tds_set_column_type(TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type)
Set type of column initializing all dependency.
Definition: data.c:224
tds_canonical_charset
int tds_canonical_charset(const char *charset_name)
Determine canonical iconv character set.
Definition: iconv.c:970
tds_socket::rows_affected
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
Definition: tds.h:1254
tds_socket::in_buf
unsigned char * in_buf
Input buffer.
Definition: tds.h:1177
tds_socket::cur_cursor
TDSCURSOR * cur_cursor
cursor in use
Definition: tds.h:1243
tds_alloc_row
TDSRET tds_alloc_row(TDSRESULTINFO *res_info)
Allocate space for row store return NULL on out of memory.
Definition: mem.c:524
tds_pool_socket
Definition: pool.h:70
tds_iconv_get_info
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:758
tds_freeze::size_len
unsigned size_len
length size (0, 1, 2 or 4)
Definition: tds.h:1579
tds_iconv_init
static int tds_iconv_init(void)
Initialize charset searching for UTF-8, UCS-2 and ISO8859-1.
Definition: iconv.c:92
tds_datain_stream_init
void tds_datain_stream_init(TDSDATAINSTREAM *stream, TDSSOCKET *tds, size_t wire_size)
Initialize a data input stream.
Definition: stream.c:204
tds_pool::waiters
dlist_users waiters
users in wait state
Definition: pool.h:128
tds_errno_message_flags
Definition: iconv.h:78
tds_datain_stream
input stream to read data from tds protocol
Definition: stream.h:63
tds_canonical_charset_name
const char * tds_canonical_charset_name(const char *charset_name)
Determine canonical iconv character set name.
Definition: iconv.c:982
tds_dynamic_stream::buf
void ** buf
where is stored the pointer
Definition: stream.h:102
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:881
tds_get_token_size
int tds_get_token_size(int marker)
tds_get_token_size() returns the size of a fixed length token used by tds_process_cancel() to determi...
Definition: token.c:2754
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:444
tds_output_stream::write
int(* write)(struct tds_output_stream *stream, size_t len)
write len bytes from buffer, return <0 if error or len
Definition: stream.h:41
tds_input_stream
define a stream of data used for input
Definition: stream.h:30
tds_message
Definition: tds.h:876
END_LOGIN_EVENT
Definition: user.c:521
tds_pool_event
Definition: pool.h:64
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:2026
tds_column
Metadata about columns in regular and compute rows.
Definition: tds.h:689
tdsiconvinfo
Definition: iconv.h:92
tds_encoding::name
const char * name
name of the encoding (ie UTF-8)
Definition: tds.h:620
tds_connection
Definition: tds.h:1091
tds_datain_stream::wire_size
size_t wire_size
bytes still to read
Definition: stream.h:65
tds_socket::out_flag
unsigned char out_flag
output buffer type
Definition: tds.h:1196
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:866
tds_set_iconv_name
static const char * tds_set_iconv_name(int charset)
Get iconv name given canonic.
Definition: iconv.c:238
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:210
TDS_SENDING
@ TDS_SENDING
client would send data
Definition: tds.h:792
tds_dynamic_stream_init
TDSRET tds_dynamic_stream_init(TDSDYNAMICSTREAM *stream, void **ptr, size_t allocated)
Initialize a dynamic output stream.
Definition: stream.c:354
tds_addrinfo
Definition: replacements.h:88
tds_read_packet
int tds_read_packet(TDSSOCKET *tds)
Read in one 'packet' from the server.
Definition: packet.c:527
tds_dynamic_stream
output stream to write data to a dynamic buffer
Definition: stream.h:99
tds_result_info
Hold information for any results.
Definition: tds.h:769
TDS_WRITING
@ TDS_WRITING
client is writing data
Definition: tds.h:791
tds_get_size_by_type
int tds_get_size_by_type(TDS_SERVER_TYPE servertype)
Return the number of bytes needed by specified type.
Definition: tds_types.h:9
tds_login::server_name
DSTR server_name
server name (in freetds.conf)
Definition: tds.h:518
tds_socket::in_len
unsigned in_len
input buffer length
Definition: tds.h:1194
tds_socket::out_pos
unsigned out_pos
current position in out_buf
Definition: tds.h:1193
tds_column::column_size
TDS_INT column_size
maximun size of data.
Definition: tds.h:694
tds_copy_stream
TDSRET tds_copy_stream(TDSINSTREAM *istream, TDSOUTSTREAM *ostream)
Reads and writes from a stream to another.
Definition: stream.c:163
tds_dynamic_stream::allocated
size_t allocated
currently allocated buffer
Definition: stream.h:104
tds_convert_stream
TDSRET tds_convert_stream(TDSSOCKET *tds, TDSICONV *char_conv, TDS_ICONV_DIRECTION direction, TDSINSTREAM *istream, TDSOUTSTREAM *ostream)
Reads and writes from a stream converting characters.
Definition: stream.c:71
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:360
tds_column::column_varint_size
TDS_TINYINT column_varint_size
size of length when reading from wire (0, 1, 2 or 4)
Definition: tds.h:701
tds_staticin_stream_init
void tds_staticin_stream_init(TDSSTATICINSTREAM *stream, const void *ptr, size_t len)
Initialize an input stream for read from a static allocated buffer.
Definition: stream.c:286
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:321
tds_quote_id
size_t tds_quote_id(TDSSOCKET *tds, char *buffer, const char *id, int idlen)
Quote an id.
Definition: query.c:2171
tds_realloc
void * tds_realloc(void **pp, size_t new_size)
Reallocate a pointer and update it if success.
Definition: mem.c:1876
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:293
tds_login::user_name
DSTR user_name
account for login
Definition: tds.h:534
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:592
TDS_DEAD
@ TDS_DEAD
no connection
Definition: tds.h:795
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:406
tds_error_message
Definition: util.c:237
tds_pool_user
Definition: pool.h:77
tds_freeze::tds
TDSSOCKET * tds
which socket we refer to
Definition: tds.h:1573
tds_get_n
bool tds_get_n(TDSSOCKET *tds, void *dest, size_t need)
Get N bytes from the buffer and return them in the already allocated space given to us.
Definition: read.c:230
TDS_IDLE
@ TDS_IDLE
no data expected
Definition: tds.h:790
tds_socket
Information for a server connection.
Definition: tds.h:1163
tds_socket::in_flag
unsigned char in_flag
input buffer type
Definition: tds.h:1195
tds_encoding
Information relevant to libiconv.
Definition: tds.h:618
tds_dataout_stream_init
void tds_dataout_stream_init(TDSDATAOUTSTREAM *stream, TDSSOCKET *tds)
Initialize a data output stream.
Definition: stream.c:244
tds_socket::out_buf_max
unsigned int out_buf_max
Maximum size of packet pointed by out_buf.
Definition: tds.h:1191
LOGIN_EVENT
Definition: user.c:100
tds_flush_packet
TDSRET tds_flush_packet(TDSSOCKET *tds)
Flush packet to server.
Definition: write.c:224
tds_output_stream
define a stream of data used for output
Definition: stream.h:39
tds_freeze::pkt_pos
unsigned pkt_pos
position in pkt
Definition: tds.h:1577
tds_login::server_charset
DSTR server_charset
charset of server e.g.
Definition: tds.h:523
TDS_PENDING
@ TDS_PENDING
cilent is waiting for data
Definition: tds.h:793
tds_env::block_size
int block_size
packet size (512-65535)
Definition: tds.h:965
tds_column::column_type
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
Definition: tds.h:696
tds_staticout_stream_init
void tds_staticout_stream_init(TDSSTATICOUTSTREAM *stream, void *ptr, size_t len)
Initialize an output stream for write into a static allocated buffer.
Definition: stream.c:313
tds_context
Definition: tds.h:1029
tds_dynamic_stream::size
size_t size
size of data inside buffer
Definition: stream.h:106
tds_freeze
Definition: tds.h:1571
tds_login
Definition: tds.h:517
tds_staticin_stream_read
static int tds_staticin_stream_read(TDSINSTREAM *stream, void *ptr, size_t len)
Reads data from a static allocated buffer.
Definition: stream.c:268
charset_alias
Definition: charset_lookup.h:36
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:396
tds_dataout_stream_write
static int tds_dataout_stream_write(TDSOUTSTREAM *stream, size_t len)
Writes data to network for output stream.
Definition: stream.c:215