problems with UTF-8

[email protected]
Newsgroups gmane.comp.db.tds.freetds
Message-ID <ogldqpgyehvakemeloox@qaha>
Hi everyone,

I have problem with UTF-8.
in config client charset is set to utf-8

Why  charset is changed to cp1250 by freetds ? My sql is send with utf-8.


this is log:


net.c:1057:instance port is 49618
net.c:205:Connecting to 10.5.2.2 port 49618 (TDS version 4.2)
net.c:270:tds_open_socket: connect(2) returned "Operation now in
progress"
net.c:310:tds_open_socket() succeeded
util.c:156:Changed query state from DEAD to IDLE
net.c:741:Sending packet
0000 02 00 02 00 00 00 00 00-62 61 63 6b 75 70 00 00 |........ backup..|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0020 00 00 00 00 00 00 06 73-61 00 00 00 00 00 00 00 |.......s a.......|
0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0040 00 00 00 00 00 02 54 72-75 64 6e 65 68 61 73 6c |......********|
0050 6f 31 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |o1...... ........|
0060 00 00 00 00 0c 39 36 37-00 00 00 00 00 00 00 00 |.....967 ........|
0070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0080 00 00 00 03 03 01 06 0a-09 01 00 00 00 00 02 00 |........ ........|
0090 00 00 00 00 50 48 50 20-35 00 00 00 00 00 00 00 |....PHP  5.......|
00a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00b0 00 00 05 31 30 2e 35 2e-32 2e 32 5c 4f 50 54 49 |...10.5. 2.2\OPTI|
00c0 4d 41 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |MA...... ........|
00d0 00 0f 54 72 75 64 6e 65-68 61 73 6c 6f 31 00 00 |..*******..|
00e0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
00f0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0100 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0110 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0120 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0130 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0140 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0150 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0160 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0170 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0180 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
0190 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01a0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01b0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01c0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |........ ........|
01d0 00 0c 04 02 00 00 44 42-2d 4c 69 62 72 61 72 79 |......DB -Library|
01e0 0a 00 00 00 00 00 0d 11-75 73 5f 65 6e 67 6c 69 |........ us_engli|
01f0 73 68 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |sh...... ........|

net.c:741:Sending packet
0000 02 01 00 4c 00 00 00 00-00 00 00 00 00 00 0a 00 |...L.... ........|
0010 00 00 00 00 00 00 00 00-00 00 00 00 00 55 54 46 |........ .....UTF|
0020 2d 38 00 00 00 00 00 00-00 00 00 00 00 00 00 00 |-8...... ........|
0030 00 00 00 00 00 00 00 00-00 00 00 05 01 35 31 32 |........ .....512|
0040 00 00 00 03 00 00 00 00-00 00 00 00             |........ ....|

token.c:328:tds_process_login_tokens()
net.c:555:Received header
0000 04 01 00 a0 00 33 01 00-                        |.....3..|

net.c:609:Received packet
0000 04 01 00 a0 00 33 01 00-e3 0f 00 01 06 6d 61 73 |.....3.. .....mas|
0010 74 65 72 06 6d 61 73 74-65 72 ab 3e 00 45 16 00 |ter.mast er.>.E..|
0020 00 02 00 25 00 43 68 61-6e 67 65 64 20 64 61 74 |...%.Cha nged dat|
0030 61 62 61 73 65 20 63 6f-6e 74 65 78 74 20 74 6f |abase co ntext to|
0040 20 27 6d 61 73 74 65 72-27 2e 0d 53 45 52 57 45 | 'master
'..SERWE|
0050 52 5c 4f 50 54 49 4d 41-00 01 00 e3 0a 00 03 06 |R\OPTIMA ........|
0060 63 70 31 32 35 30 01 00-ad 20 00 01 04 02 00 00 |cp1250.. . ......|   
<----- what is this ??? why mssql server sending that information. how
to change it ?
0070 16 4d 69 63 72 6f 73 6f-66 74 20 53 51 4c 20 53 |.Microso ft SQL S|
0080 65 72 76 65 72 00 00 5f-0a 32 ff e3 09 00 04 03 |erver.._ .2......|
0090 35 31 32 03 35 31 32 fd-00 00 00 00 00 00 00 00 |512.512. ........|

token.c:337:looking for login token, got  e3(ENVCHANGE)
token.c:122:tds_process_default_tokens() marker is e3(ENVCHANGE)
dblib.c:327:db_env_chg(0xb9577d58, 1, master, master)
token.c:337:looking for login token, got  ab(INFO)
token.c:122:tds_process_default_tokens() marker is ab(INFO)
token.c:2588:tds_process_msg() reading message 5701 from server
token.c:2661:tds_process_msg() calling client msg handler
dbutil.c:85:_dblib_handle_info_message(0xb956ab88, 0xb9577d58, 0xbf8250f0)
dbutil.c:86:msgno 5701: "Changed database context to
'master'."
token.c:2674:tds_process_msg() returning TDS_SUCCEED
token.c:337:looking for login token, got  e3(ENVCHANGE)
token.c:122:tds_process_default_tokens() marker is e3(ENVCHANGE)
token.c:2493:server indicated charset change to "cp1250"         
                  <---- here is change to cp1250 
iconv.c:988:setting server single-byte charset to "CP1250"



thax for any help

Marcin
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.