Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    MYSQL




Store Chinese Character In Mysql


My site is 90% english, however there are some pages that i need to display in chinese character. In fact, arabic, russia, spanish. In mysql, i try to use collation utf8_general_ci . So when i input the data using phpmyadmin, i type chinese character e.g •Ÿ(lucky) into the record, save it. Unfortunately when i use php to get the data from mysql database and present it on the web, it appear as '?' (question mark). How do i show it on the web correctly ?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
The Most Optimize Way To Store And Seach Chinese Character In MySQL 4.1
Currently i store the chinese character in unicode decimal format
(&#<number>;). In this way, I can display and search the chinese
character correctly. However, this will take more storage space. Is
this the most optimize way?

How To Store Chinese Chars And Also Italian, French And English In Mysql ?
I'm not able to store chinese characters into a column in a table....

how should the db setted and the table created to be able to store
different chars like chinese, french, italian and english ?

Store And Read Chinese Characters
I'm writing a vbscript application that reads UTF-8 XML containing Chinese
characters. Any suggestions how to store these characters in MySql 4.0.x ?

Do I need to set a special encoding such as Big5 on the database ?

Does MySql support storing UTF-8 ? If so what data types / encoding do I
need to use ?

Are there any special considerations for using MySql/ODBC and ADO to get and
put the data.

How To Show Chinese Character Correctly?
i'm using Mysql5.0 now, it's char_set is latin_1 and my os is WinXP Chinese Edition. In my tables, chinese characters can be shown correctly from mysql command line, but chaos when i use mysql GUI tools and phpMyAdmin. what's wrong? what should i do ?

Chinese/Unicode From Php And Mysql
I searched the forum regarding this problem already and attempted to solve the problem, but fail regardlessly.I entered chinese characters directly into a table column A which has collation utf8_unicode_ci using phpmyadmin. The chinese/unicode characters actually appeared in phpmyadmin's "select * from tableT".

However, when I create a php script with a query "select * from tableT", it appears in the form of question marks e.g. ????.Any idea how to resolve this? If I can view the chinese characters in phpmyadmin via the web browser, it shouldn't be a problem to display it in a php file, right? Not sure whether this is a php or a mysql problem.

How To Save Chinese Record In MySQL?
I am now using MySQL database to save Chinese, my OS if Chinese Windows2000, and my MYSQL version is 4.2, but I couldn't save some Chinese characters at all, some can be saved, others are lost or displayed in a mass, you won't understand the meaning at all.
Can anyone tell me how to solve this problem, how to save Chinese informaiton in MySQL?

Is MYSQL Supports Chinese Language
Is Mysql support chinese language or not.

Chinese Chars OK
I have mysql 5 and php 5.1.2 with chinese chars in utf8 on mysql.
Browsing the tables in phpmyadmin shows correct chinese characters.
However, a custom php page to display them shows only ???

At the top of my php page I did include:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Chinese Characters
I use 'LOAD DATA INFILE'.
bUT can not load Chinese characters from a txt file to a table

Importing Chinese Characters
I've got a problem with importing chinese characters into a mysql-table
and have read several mailings but didn't find a solution.

i have a utf-8 text file that contains chinese characters. the table
where i want to import the data using "load data local infile" has
collation utf8_unicode_ci. but after the import is done, the chinese
characters are converted into so strange characters. to show the
chinese symbols in a php-script i use mb_convert_encoding() which shows
me the characters properly, but the problem is that i have to order by
the col that contains the chinese characters, so the chinese characters
mustn't be converted after importing. when i use the form in phpmyadmin
to add data it is possible to store the characters properly. is there a
way to achieve this by using load data local infile?

Can't Insert Chinese Characters
In my local machine, I am using:
ASP.NET 1.1
MySql 5.0
MySQL Connector Net 1.0.6

I can retrieve and update tables contain Chinese characters without problems.

But when I pushed everything into the hosting site, I can retrieve but can't insert or update Chinese characters. It will show "?" instead.

The hosting site is using MySQL 4.1.14.

Chinese Characters - UTF8
I am attempting to store Chinese text in a table with UTF-8 encoding and utf8_general_ci collation.  After being stored, they are retrieved and displayed on a web page.  On that page, which is properly set to use the UTF-8 character set, about 95% of the characters are correct, but a few are replaced with question marks and boxes. 

the fact that most are correct indicates to me that my settings are correct in all places, but perhaps the UTF-8 Character set is incomplete.

Characters that work fine (Hex):
? (C3A5CB86E280BA)
? (C3A9E282ACC2A0)
? (C3A7C5B8C2A5)
? (C3A7E280B0C592)

Characters that are not working (Hex):
? (C3A53F3F)
? (C3A5E2809C3F)
? (C3A6CB863F)

I am using ColdFusion MX 7 and the MySQL ODBC connector on a Windows machine. This is a shared hosting environment, so I may not be able to upgrade anything.

Displaying Chinese Characters
I install MySQL v4.1.14 in WindowXP as a service. I store all the data in the plain text file and load it into the database. All the data are stored in the database successfully but all the chinese characters become '????'

Every time I need to set the character set to big5 before I can see the chinese characters in the command line interface. How can I set the big5 as the default character set?

Although I can see most of the chinese characters after setting to big5, some of the characters are still in '????' Why this happens?

Thirdly, even if I can see the chinese characters in the command line interface, all the chinese characters change back to the '????' again when I use the web browser to see the data. How to fix up this problem?

Displaying Chinese Characters
I am designing a website that needs to be bilingal English/Chinese. I decided to create a MySQL table to hold page contents with a field called language with values en or cn.

I have two PHP pages, one queries on all records with en and has a character set "iso-8859-1" the other queries on all records with cn and has a character set "gb2312".

I have decided to enter the data using an Access database linked to the MySQL database using MyODBC. When I enter english characters all works fine. when I enter chinese charcters, they initially display fine on my PC as chinese characters, but once the record has been entered these are replaced with ?? symbols.

The question marks appear to originate from the MySQL database because they show up in the Access database, the online chinese page and using PHP MyAdmin.

Search Chinese Simplified
Hello, everyone. I would like to ask something about searching Chinese simplified characters from the database. Every time I searched, it won't display data,but if I searched without a condition it displayed all data including Chinese simplified characters.

Databasing Chinese Content
My company is looking into developing spanish and chinese versions of their website. Building a custom content management system seems to be the best route for this but I'm curious as to MySQL's ability to database chinese (and other non alphabetic languages like arabic and japanese) content.Has anyone dealt with this issue or have a recommendation on another database platform I could use that offers support for this requirement?

Can Not Load Chinese Characters
I use 'LOAD DATA INFILE' syntax to insert records into a table. The txt file contains Chinese characters.After executing the command,there was no error dsplayed,but the Chinese characters were not inserted into the table,instead there was blank when I typed 'select * from table'.

Can't Enter Chinese Characters
I have tried to follow instructions online as well as other threads in this forum, so far to no avail. I am using JSP, Java 1.4, MySQL 4.1 and Tomcat 5.5 on Windows XP.
1) I have set my JSPs to use UTF-8 wherever possible. I have a form where I can enter Chinese characters into a form, which hits a servlet, but text always arrives to the servlet garbled.
2) When I try to directly do an INSERT to a column and insert a chinese character, it comes up as ??? mySQL Query browser says "Data truncated to column 'translation' at row 1' ErrorNumber 1265.
3) I have made sure that each table's encoding is UTF-8.
Not sure what else to do. I can't find any easy instructions to do this. If you know of one,

Sorting Chinese, Japanese
I have been asked to look into support for sorting non-latin 'alphabets' such as Chinese and Japanese. I already know that MySQL supports UTF-8, though my interest is in finding out how well MySQL support sorting of entries for these writing systems and what supplementary configuration I may need to do.

How To Store Jpg In MySQL?
How do I store pictures in mySQL? What is the data type for this field?

What Is The Best Way To Store XML File In MySQL?
I would like to store XML files in MySQL. What is the best solution:

1. Convert it to string and store it as CLOB/text
2. Serialize it and store as byte array
3. Flatten it out and create one column per element, each column is VARCHAR

Mysql To Store File
If i use mysql to store the file. How can i make a link for the
user to download that file?

MySQL With Store Procedure...
How to create Store Procedure on MySQL 5A ?
When I try to create the SP, but always error

"You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near ....."

But it very simple like,

CREATE PROCEDURE test1(OUT)
BEGIN
   USE Mysql;
   SELECT * FROM db;
END

And how to execute from sqlquery analyzer(like SQL Server)..

What Is The Best Way To Store A Date In MySQL DB?
I have a table (contacts) with a list of people I know. It holds info like email address and birthdays. Right now, I have the birthday saved across three fields- day, month, and year. The day and month fields hold values like '02' and the year field holds a four-digit number, like '2007'.

I know MySQL has a 'DATE' field type, and I would feel that is probably the best way to store the information I have.

My question is this:
I have some PHP code that checks to see if any of my contacts has a birthday today (as seen below)

$today = date("d/m");
$query = "SELECT * FROM `contacts` WHERE CONCAT(DAY,'/',MONTH) = '".$today."'";

How could I do this if I stored the date in a single, YYYYMMDD field?

Store Collection In MySQL
I have the following objects:

Article - Name, CreationDate, Auther, URL.
Users - FirstName, LastName, email, BirthDate.

I would like to create a favorite folder - so that each user can have a list of articles that are his favorites ones.

Each time the user login to the site he should see the list of his favorite articles.

In java I will save this list in a collection (e.g. Vector or Array). What is the best way to save it in the MySQL DB? Which data type should I use?

Anyway 2 Store Files On Mysql?
anyway 2 store files on mysql? liek a text file something?

Can MySQL 4.0.14 Store HTML
You need the following:

Database
Web Server
Server-Side Scripting Language

I would suggest using AMP (Apache, MySQL & PHP). If you want to know more
about how these work in conjunction I would suggest the excellent book:

"Web Database Applications" by Oreilly.

It is the perfect beginners guide for this area.

Store Images In MySQL
I've looked around a bit before posting this, and overall I've discovered the means to store an image in a table via blobs, and take it back out and use it with PHP. I've discovered many users giving detailed descriptions as to why this is not a good idea, and overall I agree, BUT! I've been having the PHP problem where if I upload a file and store it onto my server with a form, the permissions are set such that nobody can delete those files aside from the superuser.

I suppose this is more a PHP question, in that I am asking how I should store a file such that I can have access to delete this file later, or if I should just try to store the file in SQL?

Store Images In MySQL
I'm new to MySQL and wanted to know if I could store the images in the DB...not the location but the images.
How can I do it?
I need this info. urgently..

using the blob or mediumlob column type is fine but how do I transfer the images to tables?

Records MySQL Can Store
How many records MySQL can store?& How many records Access can store?

How To Use Trigger And Store Procedure In Mysql?
I am using mysql 4.0.20. Based on my knowlegdge, trigger and store procedure feature is not avialable for this version. However, I really need them to fulfill a task, which is to automatically export data to a file when there is new record instert. Is there a way to do it in version 4.0.20? Need your help urgently!

Trying To Store A Password In Mysql Table
Not certain if thats the right way...i changed the function to PASSWORD and it encrypted it, but when i'm trying to match the password with the encrypted one, it doesn't work.

i've been looking online and see that the password function in mysql may not do what i need. i'm looking for extra security, that's why i wanted it.

How Do I Store Variables In A MySQL Table?
I want to create a table that has a newsletter that will get emailed out to clients. In the table, I want a field for the Subject, and one for the Body. In the Subject line, I need to include a personalization variable, such as "$firstname".

In the Body content, I need to store several personalization variables. How do I store the variable name when I insert the newsletters into the table? For example, the Subject line may be: "$firstname, Here is the info I want to send you". In the body, I may have something like:

"Presented to: $name"
"From: $my_name"
"$company_name"
"$company_phone"

etc...

When I load the newsletter, I just want to store the variable names, not any content. When I open the table to load the newsletter, I need to then substitute the variable names with the true names and other content.

MySQL Store Multimedia Files
I am hiring a programmer to build an application that will serve and store multimedia content.  It will need a database backend and I am wondering if MySQL can store multimedia (audio and video) files or if it is not powerful enough.

Also, are other database options better suited to this need?

How To Store Data In BLOB Field Using MySql
I want to store file contents in BLOB field in Mysql database.

Question About Using Different Folders To Store Mysql Table
By default mysql schemas and tables are stored in the 'data' folder of mysql. Is it possible to store it under other foders in windows xp ?

How To Store Images In Mysql Data Base
how to store images in mysql.

Best Column Type To Store A C Structure In MySQL ?
I want to know the best column type for storing the data of a C structure variable. I am using C API for creating table and inserting the rows. If at all there is a one such type, if query the database inside the MySQL then how that column displays.

Is Mysql Version 4.1.11 Support Store Procedure
is mysql version 4.1.11 support store procedure?

How To Store Large Files In MySQL (Eg. 12MB)
What are the configuration changes I have to do for storing large files in the mysql databases.

I want to store large files of size 12MB to 20MB.

I am using MySQL 4.0.18 in SuSeLinux 8.2.

I tried to do changes in /etc/my.cnf file such as to increase max_allowed_packet size to 21MB but I don't find that file.

Character ' è ' In MySQL
I hope this question is relevant to the space. I'm designing a website which involves 'crème' as a product. All of the products are being stored in a MySQL db. I was wondering how to properly store this given that when it is retrieved, Firefox shows me a ? for the character 'è' and Safari does the same.



Mysql Character
I have a phpbb board and I updated my board from 2.23 to 3.0 and I get character problems on posts , if I post a new topic or anything else it is ok , so the converting gone wrong anyway I cant convert again my forum is up and running . Now I am sure there is a query to change characters from the phpmyadmin panel but I dont really not much about mysql I hope you in devshed can help me tnx.
For example : I wont to change true a query the characters in post table .

Character Set '#33' Is Not A Compiled Character Set
i keep on gettin this error when i am trying to run a php program that accesses mysql.
 Character set '#33' is not a compiled character set and is not specified in the '/usr/share/mysql/charsets/Index' file

This program was set under a cron job and worked fine till this afternoon about 2:00pm  but then went berserk with this error---

Read Excel Datas And Store In Mysql Table
In a button click, i have to read datas from excel sheet and store it in mysql database table. Code:

Can A MySql Database Store A Long Paragraph Of Text
Can a MySql Database Store a long paragraph of text, If it can, how do you go about doing this. And how many "CHARS" can you store in a "FIELD".

Can MySQL Support UTF-8 Character Set
I am developing an web application which needs to support all kinds of
languages, like english, european character set, and other asian
character set. Therefore, UTF-8 can include all those characters.
But I am using MySQL4 as my application back-end database. MySQL4
doesn't support UTF-8 character set. How can I do it? Is there any
possible way that MqSQL can support UTF-8?

Client Character Set In MySQL 4.1.10
I have a problem with character set client and connection in MySQL 4.1.10. I have all tables in cp1250_czech_cs collation and I have set a global session character_set_client, character_set_connection and character_set_result to cp1250. When I make a connection to the database in PHP (mysqli_connect();) and execute a query SHOW SESSION VARIABLES; it return that character_set_client, character_set_connection and character_set_client is set to latin1.

What can I do, when I want to set this variables to cp1250 as default? (and not use SET NAMES cp1250; in each script).

My OS is Win XP SP2 and Win 2000, Mysql version 4.1.10-nt, PHP version 5.0.3

How To Set Similar Character Set In Ad And Mysql
I am connecting users from AD to Sun Identity Manager (IDM), and the IDM uses MySQL. The strange thing is that Norwegian characters keep showing up as ? or other strange characters like a Y with double line over or A with ~ on top and some other character next to it...

We have set the character set to utf8 and collation to utf8_bin, but we get the same strange characters as we are when running latin1.

AD is running a character set called ISO-10646 (similar til unicode), and our theory is that it might be a conflict with the character sets between the different resources.

Anyone had similiar problems?

Not All Character Saved In Mysql 4.1
i'm having a probelm because i'm upgrading mysql 4.0 to 4.1 in field password, i'm keeping hashed password, so the characters has been scrambled.

when i'm using mysql 4.0, i'm able to keep all my hashed password, but after upgrading to 4.1, few character of my hashed password not saved. i'm currently using varchar for my password.

this is an example of the password. l€A;š–Ã&#65533;1,ÃF·ÒQ{„F>Ã&#65533;
mysql 4.1 only save the first character.


Copyright © 2005-08 www.BigResource.com, All rights reserved