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




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'.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
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.

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,

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.

MySQL LOad Data Infile Problem With Japanese Characters In Linux
I am trying to import a data file wich has japanese characters (sjis encoding). I am having problem loading the datafile into database using LOAD command in linux. The same command works on Windows though (Reagion set to Japan, Language Japanese without using any of the settings.

I have created the database using character set set to sjis. Table type is InnoDB and char set is sjis.

My MySQL server version is 5.0.16 on RedHat EL 3.0 AS (English and Japanese language support). I have set the following sys variables;

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" />

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?

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.

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.

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 ?

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.

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 ?

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 ?

Load Null Values In Table Through LOAD FILE
I'M TRYING TO LOAD FILE WHICH HAS NULL VALUES FOR SOME COLUMNS AT THE FIRST ROW.IT Says "Incorrect Date Value for the column" as it has null values

Load Null Values In Table Through LOAD FILE
I'M TRYING TO LOAD FILE WHICH HAS NULL VALUES FOR SOME COLUMNS AT THE FIRST ROW . IT Says "Incorrect Date Value for the column" as it has null values.

Omitting Characters Between Characters?
This is what I wrote:

select f.faqdesk_id
, c.categories_id
, f.faqdesk_question
, c.categories_name
, f.faqdesk_answer_short
from faqdesk_description as f
join faqdesk_to_categories as f2c
on f.faqdesk_id = f2c.faqdesk_id
join faqdesk_categories_description as c
on f2c.categories_id = c.categories_id

It works just fine, but the column: f.faqdesk_answer_short has characters I want to omit.
For example, the results have html formatting.

<H1>Hello World</H1><br><b>How is your day?</b>

I want to perform the search without viewing the html. Is there a way to omit the brackets & anything between them?

Difference Between LOAD LOCAL DATA INFILE And LOAD DATA INFILE?
i'm confused about LOAD LOCAL DATA INFILE and LOAD DATA INFILE? are there any significant difference btw both these query?

How To Add ... After # Of Characters?
Can somebody tell me how to add ... after a certain number of characaters that are pulled from a column in a MySQL database?

I've tried this but for some reason it isn't working:

LEFT('entry_excerpt', 40) as excerpt

ë Characters
I have a type of car in my database : Murciëlago .

I have entered this directly in the db. But I can't seem to get it out right. Can anyone tell me how to handle these things ?

20-30 Characters
How to make in MySQL search results displaying 20-30 characters before and after the search word so that users can see what they found (like Google or Altavista search, you know). It could be something like SUBSTRING(-30, ‘%$search%’, 30), but it does not work of course. I spent the whole day trying to make it and no results! Can you please help me with that?

15 Characters
Say I have "medium grey jumpsuit" as a post title, but i only want to display the first 15 characters from it. how can i do so

Western Characters
When I populate a table with "MySQL command line" and insert French characters like "é à" and then query the database with "MySQL query browser" I've got corrupted characters. Same is true vice-versa.

My OS is Windows XP (French). The server MySQL 4.1.7 is configured with character set latin1 the same for the table and field.

Changed Characters
While using mysqldump to backup the databases on my server i noticed that all the the portuguese accented characters from my databases get screwed up and changed to wierd characters.
What's up?

Russian Characters
my.conf:
[client]
...
default-character-set = cp1251

[mysqld]
...
default-character-set = cp1251

still russian characters are displayed as ?????
MySQL 4.1.14-max-log

Special Characters
I'm new working with mySQL and I'm having trouble dealing with special characters...

Every time I try to insert data on the database containing special characters (i.e. "não" ou "já") the dbms returns the error: "Data too long for column 'xxx' at row n.".

I use MySQL 5.0 and Windows XP SP2 Pro.

Here are the values of the variables like "character%" and "collation%" (The charset directory is ok, only the file utf8.xml is not in there, but it's compiled into the dbms so I think that´s not a problem... hope I'm not wrong): Code:

Japanese Characters And Jsp
I am building a site for a client in both japanese and english. I was wondering if anybody could give me some basic pointers or can direct me to a tutorial online. I am using tomcat 5.0 and MySQL 4.02.

The research that I can find has let me to believe that I need 4.1 to support full unicode or there are hacks that will do it in lower versions such as defining varchar column types as binary. I've done this and still have problems viewing or returning data correctly. I wish that i could upgrade to 4.1 to make my life simpler, but my hosting company will not do the upgrade for some time.

I am wondering if there are things that i need to do to my java query? Is there a way around this where i can use the same query and dataconnector class that i have now to return japanese and english?

Three And Less Characters Searching
I've got a database that has boolean search on it, but from what I read and see from my results, MySQL ignores words with three or less characters, is there a way to force this? or how I can deal with having two and three character words searched?

Swedish Characters
I thought that working with swedish characters would be easy, but
since I'm working with MySQL 4.1 that's not the case any more.
First thing I noticed (emditly) was an application that I've written
in Qt showd rubbish in the QDataTable where there should be swedish
characters. So I took a look in the database using the 'mysql' client
app, but using this, all is good? So I made a 'mysqldump -u xx -pxx
dbname < cazzo.sql' and took a look in the .sql file, but again the
swedish characters were rubbish.

I've really tried a lot of thing to solve this. E.g. changing the
default-character-set to all kinds of values, creating new databases,
etc etc. But I just can't get it. What am I missing?

Characters That Must Be Escaped
Is there a definitive list of characters that must be escaped in order to
insert them into a text field in mysql.

Escape Characters
I'm trying to use an SQL plug-in to synch. FileMaker (FM) with a MySQL
DB. All is going great EXCEPT my FM text fields. If I have any special
characters in my FM text field, they foul-up the INSERT/UPDATE query
and produce an error.

For example, in the following sentence in the FM field:

I'm happy!

The information needs to go into the MySQL column as:

I'm happy!

The "escapes" out the ' so that it doesn't foul up the SQL. I'm
aware of the substitute function in FM, but there are many characters
that have to be escaped and using that function seems cumbersome to do
so. In PHP there's a function called addslashes that will take care of
this for you. Does anyone know of a similar function or method within
FM? Likewise, I can also call MySQL functions, however I'm restricted
to those available in MySQL 3.23.43.

Special Characters
I am looking for a way to parse out certain characters when I write a select statement to an outfile.
I know how to escape the characters w/ the escaped by clause, but I need to parse off some double quotes and some backslashes.

select id, name from artists where id in(14346, 25919, 76150) INTO OUTFILE '/tmp/test_5.csv' FIELDS TERMINATED BY ',' ESCAPED BY '' LINES TERMINATED BY '

Foreign Characters
I exported a table from access that had some foreign characters like russian for example. In the mysql db on an apache server (remote isp) the characters show up as question marks. Is there anything I can do to get the charcaters to display correctly in the database?

Gibberish Characters
When I uploaded my db to 4.1, I noticed that phpMyAdmin displayed the collation as latin1_swedish_ci. I had never seen mention of collation in the previous version.
This presents a problem as characters with accents display as gibberish or chinese characters.What character set and/or collation should I use?

Select Characters
I have a site I'm working on at APOD I currently have a little news script that selects 3 random articles out of the database. What I would like to do is limit how much text it selects from the title, because some of the titles are quite long and then the link wraps, which I would rather not do.
Is there a way for me to do this? Say if I only want to select 100 characters from the title column?

Retreive First Characters
I have a field in my database called "description" (type:longtext) and I would like to retreive the first let's say 13 characters. What wold the select query be?

Multilanguage Characters
I was trying to insert utf8 data which cames from a form into a table..all the charset and collation of the target table is set to utf8. i found this solution:

PHP Code:
<?
   mysql_query("insert  table_name set field = _utf8'value'");
   //'value' came from post variable
?>
this code works.however, my concern is this the proper way to insert data to db as compared to the normal insert? (insert into table (fields) values ('values') )?

Special Characters
ok the text for my site is in database only i have problems with quotation marks that screw up url's and stuff.what you think is a efficient solution for displaying & #8221; instead of "
but without changing it for real in all the data

PHP / MySQL Characters
(This is a multi-dicipline problem... I hope nobody is upset because I posted this in PHP, MySQL and XML areas)

Characters Escaped
Is there a definitive list of characters that must be escaped in order to
insert them into a text field in mysql?

Special Characters
Smetime ago I posted a message about MySQL not dealing with characters other than the very basic set. It cannot deal with french characters such as é and à. It just ignores them and whatever is after.It seems to be a 4.2 issue, as I think they changed the way MySQL deals with character sets.I cannot resolve the problem. I cannot store characters in MySQL other that the basic set of english characters. Anyone had to cope with this issue before??

Foregin Characters
I was wondering if it was possible to insert foreign characters in mysql when not using the latest version that supports more characters.
I need to store information in russian, chinese, and japanese and my web hosting provider probably wont upgrade mysql for a while

Reading UTF-8 Characters
According to phpmyadmin, my server is set to MySQL charset: UTF-8 Unicode (utf8) and the collation is utf8_general_ci. My database has the same collation, and in one table I have some Japanese characters. They enter into the table ok and can see them.
However when I connect to the database via a php page and read the values they just appear as '?????'
I have tested just using a php echo to print some japanese characters on the same page and that works fine. Thats why I think its something to do with reading the characters from the database.
Is there something obvious I am missing? I have tried googling and searching on these forums but nothing seems to work. It's quite discouraging


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