ASP, MySQL and UTF-8

后端 未结 2 867
清歌不尽
清歌不尽 2021-01-06 05:43

First of all, I\'ve read almost all topics about this. I\'ve tried all advices but I couldn\'t solve this problem.

Here is the thing. I use Classic ASP and MySQL for

2条回答
  •  无人及你
    2021-01-06 06:12

    You need to specify the character set in the connection string using the charset parameter; see the MySQL ODBC doco. e.g. add "charset=utf8;" "charset=ucs2;" to your connection string.

    Edited: I finally got a chance to run a simple test harness on this, and it does indeed fail with charset=utf8. However, since VBScript is running internally with UCS2, I gave it a try with charset=ucs2 and it works fine. NB: page is still set to send all output as UTF-8, it's just that VBScript is pulling data from an ODBC connection using UCS2. Job is done :)

提交回复
热议问题