"Janosik" <ja*@vlaamsemolshoop.bewrote in message
news:11*********************@19g2000hsx.googlegrou ps.com...
>Hi again,
I found some PHP-code that works fine, but I can't get it to work in
ASP :
$mysql_id=mysql_connect("$dbhost","$dbuser","$dbpa ss");
mysql_query("SET CHARACTER SET 'utf8'", $mysql_id);
What's the ASP-version for this last line?
There isn't one. ASP doesn't provide the same seamless DB access functions
that PHP does for MySQL. I would guess you would need an ADODB connection
using an ODBC provider and the MySQL ODBC connector. You may then be able
to execute this command using the connection execute method.
However whether that is useful or not I can't say.
>It should explicitly define encoding in which data are transferred
from the database.
Yes it should see the client (thats the Web server in thisc case) as a
Unicode user. All strings in ADO and VBScript/JScript are unicode. IIRC
correctly there is a configuration setting somewhere in MySQL which
specifies what assumption it can make about the codepage the client is
using. I could be wrong MySQL isn't common in ASP development.
Once the string is retreived correctly from the DB Server as unicode string
it can be written to the browser using the techiniques I've already posted.
BTW, why not just stick with PHP?
--
Anthony Jones - MVP ASP/ASP.NET