Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

RE: FN-FORUM: MySQL, ASP.NET and Chinese PRC

date posted 9th August 2007 22:41

Hi Alex,

Thanks for this. I've now recoded the site front end to use the .NET 1
MySQL connector and can now input and view Chinese characters on a test page
I built. However, the big challenge is the CMS which is in Classic ASP and
uses the ODBC method. If I can't get that to work, it's a major re-write.
I'm just stunned there's so little definitive information, even on the MySQL
site's forums.

Many thanks,

Craig

-----Original Message-----

Hi Criag,

I've just read your posting, and was intrigued at your challenge, so I
thought I would give it a go too. I am not an ASP.NET user (I prefer open
source!), but found this:
http://forums.mysql.com/read.php?103,17168,21269#msg-21269. It is part of a
string of comments about trying to show Chinese characters in
MySQL/VB.NET/C#, but it does mention using a different connector than ODBC.
Would this present a problem for you, or are you obliged to use ODBC (as I
suspect might be the case)?

I then came across this site as well -
http://www.w3schools.com/php/func_string_htmlentities.asp; it does not look
immediately like it might fit in with what you are looking for, but a gut
feeling says that it might be possible to look at the rendering of the text
on screen in HTML as an alternative?

I have also found this blog posting:

Tuesday, October 25, 2005 2:08 AM by Shunjie
Adding chinese characters using mysql .net connector
I got this problem when adding chinese characters to mysql database using
mysql .net connector. After changing the database encoding to utf-8 and the
page encoding to utf-8, i still get ??? when inserting information into the
database. Finally, the problem is solved by insert 'charset=utf8' to the
connection string, so it looks something like this:

Database=;Data Source=;User
Id=;Password=;charset=utf8

=)

Comments
No Comments
New Comments to this post are disabled

(from
http://community.sgdotnet.org/blogs/shunjie/archive/2005/10/25/22413.aspx)


I hope the above helps, as a start?

Alex.


Hi Adam,

All that's been done already thanks. The issue appears to be ODBC connector
but I can't find any actual instructions on syntax or usability that makes
sense in the current application.

You only get marmite if you can tell me if the MySQL ODBC 3.51.18 connector
will pass Chinese characters for both classic ASP and ASP.NET. What needs
to be in the connection strings and are there any other things that need to
be done like issuing a "SET NAMES utf8" instruction, but if so, how do you
do it, where and when?

You see, this site front end is AHTML ASP.NET VB V1.1 but the CMS is XHTML
classic ASP. Both use the same ODBC connector. Don't ask, I didn't write it,
but I now have to have it spitting out Chinese text and soon!

Shall I pop out to Sainsbury's?

Craig

-----Original Message-----


Craig wrote:
> Hi there,
>
> I'm now getting desperate. Is there anyone out there with experience
> of using MySQL 5.0, ASP.NET VB V1.1 and ODBC 3.51 connector to drive a
> site that can potentially have European and Chinese (PRC) characters
displayed.
>
Just a quick thought, MySQL does not by default create tables in UTF-8
format. Have you ensured that this is switched on? Basically check that
ASP.NET also understands that this stuff is UTF-8 and also ensure your html
states that this is UTF-8

That *should* solve the problem.

If it does, I'll email you address and you can send me a jar of marmite :)



--
Freelancers, contractors earn more with Prosperity4 Call 0870 870 4414 or
visit www.prosperity4.com and benefit from Inland Revenue approved expenses
today.




Messages by Day
August 31st 2007
August 30th 2007
August 29th 2007
August 28th 2007
August 27th 2007
August 26th 2007
August 25th 2007
August 24th 2007
August 23rd 2007
August 22nd 2007
August 21st 2007
August 20th 2007
August 19th 2007
August 18th 2007
August 17th 2007
August 16th 2007
August 15th 2007
August 14th 2007
August 13th 2007
August 12th 2007
August 11th 2007
August 10th 2007
August 9th 2007
August 8th 2007
August 7th 2007
August 6th 2007
August 5th 2007
August 4th 2007
August 3rd 2007
August 2nd 2007
August 1st 2007


Messages by Month
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007


Messages by Year
2008
2007
2006
2005
2004
2003
2002
2001
2000