Ask a Question related to Macromedia ColdFusion, Design and Development.
-
Tiono #1
Displaying Chinese Character store in MySQL Database
Hi, is there anyone who know how to display chinese character store at MySQL
database?
I can display it correctly when using MS Access database. But when i switch to
MySQL Datasource, chinese character will become square.
When i view my data using MySQL Front in windows, I can see the chinese
character there.
For my coldfusion application, I set all encoding to UTF-8. it's set using
setEncoding function, cfcontent, and cfprocessingdirective.
Thanks for any help.
Tiono
Tiono Guest
-
Displaying Images from the Mysql Database
Hi! everyone, i need help with displaying the images from the database. I successfully inserted an image to mysql database by converting it to... -
Chinese Character in Director?
I am using English WinXP and English DirectorMX. I need to produce a Chinese-CD, and I am facing difficulties in embeding the fonts into director.... -
Displaying & formatting text with mysql database
I need some help with formatting some text received from a database query. I am only selecting a single row per query so the formatting will only... -
Displaying images from a MySQL Database
Hi I'm have difficulty displaying images that are stored in a MySQL database. I've tried using the odbc.net provider, the ByteFX provider and the... -
How to store and display chinese in a web form?
Hi Zhou, Is the field a unicode type? are you using the IME to input the chinese? Unicode types are "ntext" or "nvarchar". HTH ?? I've had... -
PaulH #2
Re: Displaying Chinese Character stored in MySQLDatabase
what version of mysql? what encoding did you use in your mysql db? did you add this to that dsn's connection string (if indeed you used utf-8)?
using useUnicode=true&characterEncoding=utf8
PaulH Guest
-
Tiono #3
Re: Displaying Chinese Character stored in MySQLDatabase
i'm not sure what mysql version that i use. i think it's ver 3.2xxx. I must
wait until i get home to check it. i'm running mysql in windows, so don't know
how to set encoding use by database.
where should i put the connection string? at textbox input in Add/Edit
Datasource dialog of Coldfusion Administrator?
I'll have to wait until i get home and test it all. So must wait until
tomorrow for the test result.
Thanks for your help.
Tiono
Tiono Guest
-
PaulH #4
Re: Displaying Chinese Character stored in MySQLDatabase
3.2 is kind of old and doesn't support unicode (which i strongly urge you to
use). 4.1 might be a better choice. mysql is kind of granular in it's encoding
support, you can set the db,table, column to an encoding. for the db you might
do something like
CREATE DATABASE dayLateAndADollarShort DEFAULT CHARACTER SET utf8
to get utf-8 for the whole db.
the connection string goes in the connection string option under the advanced
menu for that dsn.
PaulH Guest
-
Tiono #5
Re: Displaying Chinese Character stored in MySQLDatabase
I checked my MySQL Server version and it's version 3.2.53.
I also try to execute SQL Statement from you "CREATE DATABASE
dayLateAndADollarShort DEFAULT CHARACTER SET utf8" and got error in syntax.
I'll download version 4.1 today and then give it a try.
Thanks a lot for your help.
Tiono
Tiono Guest
-
Tiono #6
Re: Displaying Chinese Character stored in MySQLDatabase
Hi Paul, I tried your hints, but it didn't work at my computer. I use MySQL
4.1.7. alter my database and tables default character set to utf8. then put
parameter to connection string in coldfusion data source admin page.
when i view my page for chinese language, chinese character still get square
box. when i switch back to MS Access database, chinese character display
correctly.
Is there another step that is needed to display chinese character stored MySQL
database?
Tiono Guest
-
PaulH #7
Re: Displaying Chinese Character stored in MySQLDatabase
boxes mean the browser can't render that char, could be a font issue or
slightly "off" encoding (and fyi "/" question marks mean the data is garbaged).
once you set the database to utf-8 did you re-enter the data (i don't know but
i don't think mysql will do teh conversion for you automatically)? and what
driver are you using for access?
PaulH Guest
-
Tiono #8
Re: Displaying Chinese Character stored in MySQLDatabase
yes, i already reenter the data. The way that i reenter data is the same like i
enter data to MS Access database. I'm using MS Access with unicode support for
MS Access database Data Source.
I think there can't be a font issue since i'm using the same CSS when testing
with MS Access database. What i do is just switching between MS Access DSN and
MySQL DSN.
Btw, i'm using CFMX7 now in my installation.
Tiono Guest
-
PaulH #9
Re: Displaying Chinese Character stored in MySQLDatabase
hang on...are you sing the latest mysql JDBC drivers (as "other" in cfamdin)? then maybe [url]http://weblogs.macromedia.com/cantrell/archives/2005/02/utf8_mysql_41_a.cfm[/url] will be of some help.
PaulH Guest
-
Tiono #10
Re: Displaying Chinese Character stored in MySQLDatabase
Great, think I can get it work now, i hope :D
i'll try it with MySQL Connector J JDBC driver later at home.
thanks a lot for your help Paul.
Tiono Guest
-
carolhk #11
Re: Displaying Chinese Character store in MySQL Database
Hi,
I am new in programming with Coldfusion, I am writing a website in chinese.
The chinese display in .cfm pages is fine but the dBase is "???"...
My hosting company is using MySQL 5.0.82sp1 and my settings at mysql are as follows:
Variable_name Value
character_set_client utf8
character_set_connection utf8
character_set_database utf8
character_set_filesystem binary
character_set_results utf8
character_set_server latin1
character_set_system utf8
character_sets_dir /usr/share/mysql/charsets/
what is wrong int my setting?
I have tried using <cfprocessingdirective pageencoding = "utf-8"> within body tags and with header, also <cfcontent type = "text/html charset = utf-8"> in the header...
but not working. Tried a thousand times,...
Some experts may help me? Thanks.
Junior Member
- Join Date
- Nov 2010
- Location
- hk
- Posts
- 1



Reply With Quote

