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_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_socket_set_nonblocking
int tds_socket_set_nonblocking(TDS_SYS_SOCKET sock)
Set socket to non-blocking.
Definition: net.c:168
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_freeze::pkt_pos
unsigned pkt_pos
position in pkt
Definition: tds.h:1572
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_canonical_charset
int tds_canonical_charset(const char *charset_name)
Determine canonical iconv character set.
Definition: iconv.c:968
tds_freeze::size_len
unsigned size_len
length size (0, 1, 2 or 4)
Definition: tds.h:1574
tds_dynamic_stream::size
size_t size
size of data inside buffer
Definition: stream.h:106
tds_socket::frozen_packets
TDSPACKET * frozen_packets
list of packets frozen, points to first one.
Definition: tds.h:1204
tds_dataout_stream_init
void tds_dataout_stream_init(TDSDATAOUTSTREAM *stream, TDSSOCKET *tds)
Initialize a data output stream.
Definition: stream.c:244
tds_login::server_name
DSTR server_name
server name (in freetds.conf)
Definition: tds.h:519
END_LOGIN_EVENT
Definition: user.c:521
TDS_IDLE
@ TDS_IDLE
no data expected
Definition: tds.h:791
tds_errno_message_flags
Definition: iconv.h:78
tds_socket::in_buf
unsigned char * in_buf
Input buffer.
Definition: tds.h:1178
tds_socket::cur_cursor
TDSCURSOR * cur_cursor
cursor in use
Definition: tds.h:1244
tds_staticin_stream
input stream to read data from a static buffer
Definition: stream.h:81
tds_freeze
Definition: tds.h:1566
tds_copy_stream
TDSRET tds_copy_stream(TDSINSTREAM *istream, TDSOUTSTREAM *ostream)
Reads and writes from a stream to another.
Definition: stream.c:163
tds.h
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_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_read_packet
int tds_read_packet(TDSSOCKET *tds)
Read in one 'packet' from the server.
Definition: packet.c:527
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
tds_dynamic_stream::buf
void ** buf
where is stored the pointer
Definition: stream.h:102
tds_socket::rows_affected
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
Definition: tds.h:1255
tds_pool_event
Definition: pool.h:64
tds_iconv_alloc
int tds_iconv_alloc(TDSCONNECTION *conn)
Allocate iconv stuff.
Definition: iconv.c:305
tds_result_info
Hold information for any results.
Definition: tds.h:770
tdsiconvinfo
Definition: iconv.h:92
tds_socket::out_buf
unsigned char * out_buf
Output buffer.
Definition: tds.h:1186
TDS_SENDING
@ TDS_SENDING
client would send data
Definition: tds.h:793
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_connection::product_version
TDS_UINT product_version
version of product (Sybase/MS and full version)
Definition: tds.h:1094
LOGIN_EVENT
Definition: user.c:100
tds_iconv_init
static int tds_iconv_init(void)
Initialize charset searching for UTF-8, UCS-2 and ISO8859-1.
Definition: iconv.c:90
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::env
TDSENV env
environment is shared between all sessions
Definition: tds.h:1102
tds_socket
Information for a server connection.
Definition: tds.h:1164
tds_set_iconv_name
static const char * tds_set_iconv_name(int charset)
Get iconv name given canonic.
Definition: iconv.c:236
TDS_WRITING
@ TDS_WRITING
client is writing data
Definition: tds.h:792
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:864
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:877
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
tds_encoding::canonic
unsigned char canonic
internal numeric index into array of all encodings
Definition: tds.h:625
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:590
tds_encoding
Information relevant to libiconv.
Definition: tds.h:619
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_freeze_abort
TDSRET tds_freeze_abort(TDSFREEZE *freeze)
Discard all data written after the freeze.
Definition: packet.c:961
tds_output_stream
define a stream of data used for output
Definition: stream.h:39
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:1030
tds_env::charset
char * charset
character set encoding
Definition: tds.h:969
TDS_STATE
enum tds_states TDS_STATE
values for tds->state
tds_pool
Definition: pool.h:105
tds_login::server_charset
DSTR server_charset
charset of server e.g.
Definition: tds.h:524
tds_dstr_isempty
static int tds_dstr_isempty(const DSTR *s)
test if string is empty
Definition: string.h:60
tds_freeze::pkt
TDSPACKET * pkt
first packet frozen
Definition: tds.h:1570
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:227
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_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:756
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_column::column_size
TDS_INT column_size
maximun size of data.
Definition: tds.h:695
tds_error_message
Definition: util.c:237
tds_pool_user
Definition: pool.h:77
tdsiconvdir
Definition: iconv.h:85
tds_env::block_size
int block_size
packet size (512-65535)
Definition: tds.h:966
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_staticout_stream
output stream to write data to a static buffer.
Definition: stream.h:92
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_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_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_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_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:2750
tds_datain_stream::wire_size
size_t wire_size
bytes still to read
Definition: stream.h:65
tds_encoding::name
const char * name
name of the encoding (ie UTF-8)
Definition: tds.h:621
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
tds_dataout_stream
output stream to write data to tds protocol
Definition: stream.h:72
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::out_flag
unsigned char out_flag
output buffer type
Definition: tds.h:1197
tds_input_stream
define a stream of data used for input
Definition: stream.h:30
tds_pool_socket
Definition: pool.h:70
tds_message
Definition: tds.h:877
tds_canonical_charset_name
const char * tds_canonical_charset_name(const char *charset_name)
Determine canonical iconv character set name.
Definition: iconv.c:980
tds_login
Definition: tds.h:518
tds_realloc
void * tds_realloc(void **pp, size_t new_size)
Reallocate a pointer and update it if success.
Definition: mem.c:1876
tds_socket::out_pos
unsigned out_pos
current position in out_buf
Definition: tds.h:1194
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:408
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:1234
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:702
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_datain_stream
input stream to read data from tds protocol
Definition: stream.h:63
tds_packet
Definition: tds.h:1058
tds_addrinfo
Definition: replacements.h:88
tds_socket::in_len
unsigned in_len
input buffer length
Definition: tds.h:1195
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_freeze::tds
TDSSOCKET * tds
which socket we refer to
Definition: tds.h:1568
tds_login::password
DSTR password
password of account login
Definition: tds.h:536
tds_dynamic_stream::allocated
size_t allocated
currently allocated buffer
Definition: stream.h:104
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
tmp_col_struct
Definition: stream.c:44
TDS_PENDING
@ TDS_PENDING
cilent is waiting for data
Definition: tds.h:794
tds_socket::out_buf_max
unsigned int out_buf_max
Maximum size of packet pointed by out_buf.
Definition: tds.h:1192
tds_column
Metadata about columns in regular and compute rows.
Definition: tds.h:690
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:442
TDS_DEAD
@ TDS_DEAD
no connection
Definition: tds.h:796
tds_flush_packet
TDSRET tds_flush_packet(TDSSOCKET *tds)
Flush packet to server.
Definition: write.c:224
tds_connection
Definition: tds.h:1092
tds_login::user_name
DSTR user_name
account for login
Definition: tds.h:535
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::column_type
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
Definition: tds.h:697
tds_pool::waiters
dlist_users waiters
users in wait state
Definition: pool.h:128
tds_socket::in_flag
unsigned char in_flag
input buffer type
Definition: tds.h:1196
charset_alias
Definition: charset_lookup.h:36
tds_output_stream::buffer
char * buffer
write buffer.
Definition: stream.h:50
tds_dynamic_stream
output stream to write data to a dynamic buffer
Definition: stream.h:99
tds_socket::in_pos
unsigned in_pos
current position in in_buf
Definition: tds.h:1193
TDS_READING
@ TDS_READING
client is reading data
Definition: tds.h:795
tds_pool_member
Definition: pool.h:86