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






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





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.




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
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 Replies !   View Related
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?

View Replies !   View Related
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?

View Replies !   View Related
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,

View Replies !   View Related
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 Replies !   View Related
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.

View Replies !   View Related
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?

View Replies !   View Related
Collation :: Chinese Characters In Latin1_swedish_ci
I used 4.1.8 to create a database with latin1_swedish_ci collation. And input some Chinese by web with UTF-8. When I export it to a file then import to another database, all characters become symbol in the new database. Why this happen? How can I recover the Chinese?

View Replies !   View Related
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 ?

View Replies !   View Related
LOAD DATA INFILE & Chinese Characters
I use 'LOAD DATA INFILE'. But can not load Chinese characters from a txt file to a table

View Replies !   View Related
Database Cannot Recognize Chinese / Korean/ Japanese Characters
For some reason, my database can't recognize information submitted in Chinese characters (or any other Asian characters for that matter).

I've created a test two variable database for id and name, and I've been told that the "UTF-8 Unicode" recognizes all characters, which doesn't seem to be working. My MySQL recognizes this character set. I inputted the following SQL query:

create table test(
id int(8 ) collate utf8_ci_as null,
name varchar(15) collate utf8_ci_as null
)

Am I doing anything wrong? It doesn't support GBK or other character sets.

View Replies !   View Related
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:

View Replies !   View Related
Store Asian Characters
I have some form input in my application that stores the input in a MySQL database. The user is able to input their details in Chinese, Japanese, Hebrew and Russian characters but when these are entered into the DB they get scrambled up.
Presumably this is due to my DB being latin1_swedish_ci which from searching on the net I believe to be the standard for roman/latin characters.
How can I make it so that MySQL can store all these char sets? Would it be a case of altering the latin1_swedish_ci thing (which presumably could cause problems later perhaps) or would the alternative be to store the information as binary information? Would this make any difference.
If I can't store the various character sets in the DB then I'll have to try and limit the character input in my application.

View Replies !   View Related
Can't Store More That 45 Characters In A 255 Varchar Field
I have this table:

TermName | CREATE TABLE `TermName` (
`id` varchar(45) character set utf8 NOT NULL,
`term_name` varchar(255) character set utf8 default NULL,
`prefix` varchar(20) character set utf8 default NULL,
PRIMARY KEY (`id`),
FULLTEXT KEY `TermName` (`term_name`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

on my server and a java app which updates this and other tables weekly. The first time i created this table i created with term_name varchar(45) which afterwards i changed it to 255. The problem is that the field "term_name" won't hold more than 45 characters while it should. I have tested the java pplication and thats works fine. my mysql server/client is 5.0.32 running on debian sarge.

I'm using PrepareStatement on the java side to send the String and even at that time it the complete string while when it gets stored in the DB its shorter.

View Replies !   View Related
How To Store Usernames With Special Characters
This may sound like a bit of a stupid question, but using MySQL (5.0), what is the best way to store a username that contains special characters (such as Spanish or Portuguese characters like ñ, ç, ã, é but not limited to these, any character really)?

When taking a registration from someone, should I run the username through PHP's htmlentities first before inserting it into the database and then whenever querying it, run the query string htmlentities also?

Also, MySQL seems to by default, store all characters as "latin1_swedish_ci". Is it advisable to store them as "utf8_unicode_ci"?

View Replies !   View Related
Store Characters Of Different Character Sets In One Database
(normally i am an oracle database administrator....)

and i have a short question:

Is it possible to store charactors from different
character sets in one database ?

For example: special chars from Poland and from Greek ?

View Replies !   View Related
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" />

View Replies !   View Related
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.

View Replies !   View Related
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?

View Replies !   View Related
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.

View Replies !   View Related
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 ?

View Replies !   View Related
Is MYSQL Supports Chinese Language
Is Mysql support chinese language or not.

View Replies !   View Related
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?

View Replies !   View Related
Special Characters :: Parse Out Characters In Outfile
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 '

View Replies !   View Related
Special Characters :: French Characters
Sometime 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??

View Replies !   View Related
Read In A .sql File
I have a large SQL file that contains a bunch of create table statements.How do I get mysql to read in this file and process the sql. =20.I am not thinking load data infile because it isn't text

View Replies !   View Related
Read Out An AUTO_INCREMENT-ed Value
The first column of my table is AUTO_INCREMENT. I fill my table with 5 records with a blanco value in their first field. The first column of my table will then hold the values 1,2,3,4,5 (top>down).

Then I erase those 5. Then I add a new record with a blanco first value. It will get number 6.

My problem in this scenario:

I want to read out this number 6 before I will insert that record. Is that possible?

View Replies !   View Related
MySqlDataReader.Read()
Then you ask the Mysql .Net Connector Reader to Read forward is it moving a server side cursor forward?
Or is it just moving forward in a cache of the query result that is already on the client?
I assume(hope) it is the latter but just asking.

View Replies !   View Related
How To Read Log Files
I running on Win2K3 and need to know the basics of mySql system health logs (their location, their expected contents and format) and any other logs that might help track down problems when mySql crashes. I've seen that it will log EventViewer events and that within the C:Program FilesMySQLMySQL Server 5.0data directory there are some logs.

I've been able to read the .err log since it's text but the other logs are binary. Do I have to use a cmdline app within the mySql distriubtion to read the binary files? Or, is this a well documented format and there are several 3rd party utilities out there that will parse/display these logs.

In general, where does mySql maintain its log files, does it generate separate log files per database and what are some common applications that I need to get familiar with to view the contents of these files?

View Replies !   View Related
Read-only Tables
Is there a way to mark a table as read-only (after inserting some initial data, of course)?
I'd like to do it for optimization reasons - hoping that mysql could take advantage of the knowledge it's read-only, for caching, etc.

View Replies !   View Related
Read The .err File
Working on installation in Mac OSX 10.4. Need to read the .err file, but don't know how to find it. If you can help, please show the path from from the 'top' i.e. /usr/local/mysql/ and the rest of the path.

View Replies !   View Related
Table Is Read Only
i transfer my mysql database in windows into linux by copy and paste it.when i want to update table record,it promt an error msg:

Error Code : 1036
Table 'ardi02' is read only
(2 ms taken).

View Replies !   View Related
How To Lock A Max ID From Being Read
Basically what I want to do is read the maximum id_B from some table with id_A = 5 and insert a new row with a new id_B. While I do this I don't want anyone else to be able to insert a new row with id_A = 5.

If I do this:

SET AUTOCOMMIT=0;
SELECT MAX(id_B) FROM table WHERE id_A = '5' LOCK IN SHARE MODE;
// do php code here to increment MAX(id_B) by 1 and save it to $new_id_B
INSERT INTO table (id_A, id_B) VALUES ('5', '$new_id_B')
COMMIT;

Would this prevent other users from inserting a new record with id_A = 5, while I'm adding a new record with id_A = 5.

View Replies !   View Related
Can't Read Dir Of './mysql/'
I am currently using MySQL under Mandrake Linux 10.1 and have an error (see the title).
I have an error message when I want to see All the databases into my Server. I am using PHPMyAdmin.


View Replies !   View Related
Table Is Read Only...
i just copied the .frm, .MYI and .MYD to mysql linux's server, but when i try to create index on a table it gives me "Table 'TEST1' is read only,

View Replies !   View Related
Read Only Tables
I log on as a user who has select, insert, update, delete privilegies but when i'm trying to for example insert row in my table myadmin reports me that the table is read only. where can I as a root change this and what are the options?

View Replies !   View Related
How To Read Phpbb
php file is loaded as codes on windows, but when u upload it on web u get the codes showed as image and stuff, so my question is, when using local host (windows xp) what prog or how i can see the php files not as codes/source when opening but as image or table or whatever.

View Replies !   View Related
Read From Database
I have set up a database with a table called "2009". I have 2 rows with about 16 fields. I have data stored in these two rows.

I have some code that tells me this table exists. Below that code I have this code:

Code:
$sql = "SELECT * FROM 2009";
$result = mysql_query($sql, $conn) or die(mysql_error());
I get this 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 '2009'". The error is in the second line because when I comment it out, I don't get the error.

I have a number of books on MySQL, and I have tried many different ways to retrieve data from the data base, but I am constantly getting errors. The above code is simple code that produces this error.

View Replies !   View Related
MySql Write Vs Read
Essentially I am faced with a design choice;

have an oft run (modifiable) query run every time any user wants to
run it, comparing criteria againt each and every user in the table and
delviering list OR saving that list (user/user/) so the next time all
that needs to be queried is the existence of a record in the table.

The basic tradeoff; version 1 there are many simultaneous queries of
the user db on complex search criteria; version 2 there are fewer but
their are as many far more simple queries to a much larger table, not
to mention many writes to same to keep the table current.

I know this is pretty vague, but I was wondering if in general there
is an area that mysql excels in vis a vis complex query smaller tables
simple query larger tables.

Question 2 is there anyway to guestiate the search/write times of a
user log in to both query and update? #Records, fields, etc? I'd like
to keep log in to < 10 seconds max.

View Replies !   View Related
Editing Read Only Tables
ive got a database in phpmyadmin..i need to change a value in a coumn in a table..but when i do so, the following error message would show up:

Quote:
MySQL said: Documentation
#1036 - Table 'table' is read only

how can i deal with it

View Replies !   View Related
Creating A Queue Read-out.
I am trying to create *what should be* a simple result of where a person is in line, but I am having a lot of trouble. I have spent hours searching, and for one thing I don't even know what to search for. So here's what I am trying to do...

Let's say I have rows 1-10 in a database and rows 2,5,6,9, & 10 are all marked with '0' and the others with '1'.

If my $ID is '6', then my code would print out < 3 of 5 >.

Here is the code that I do have...

$num_in_line = (I don't know what query to put here.)

$of_total = mysql_result(mysql_query("SELECT COUNT(ID) FROM all_programs WHERE list = '0'"),0);

echo $num_in_line.' of '.$of_total;

View Replies !   View Related
Read Text From A File
I have a text file which contains the following data

1&david&0248814&software engg&1973
2&thomas&8475623&commerse&1965

I have created a table <info> with the attributes
nr
name
reg_nr
sub
born_yr

I need to somehow read the data from the file n insert them into the table attributes...
does anyone over here know how could this be done ?
to insert the data to the table could be done with insert into <table> values <value> but the problem is how can i read it from the file...leaving the '&' sign ?

View Replies !   View Related
Read & Write Locks
I need to lock some of my tables for a while with lock tables. However I find how the READ and WRITE locks is implemented in the MyISAM storage engine a little odd. When obtaining a READ lock all updates are prevented, including writes from the thread obtaining it. WRITE locks gives exclusive access to the issuing thread.
However what I want is to give read and write priveleges to one thread and read priveleges to all other threads, and I can't figure out how to obtain this effect with lock tables... Is it even possibel?

View Replies !   View Related
READ A TEXT FILENAME
Since a text file can be loaded in the MySQL, I feel that there is a way MySQL will be able to read a text file name. Any idea how to do that? And after reading the text file name, how do i insert it in the column.

View Replies !   View Related
Read-only TIMESTAMP Field
I need a table with TIMESTAMP field which must be always set to a CREATE server time (so the == CURRENT_TIMESTAMP).

How do I make it read only? I.e. make user unable to override the default value (CURRENT_TIMESTAMP) on CREATE and UPDATE. Is it the Q of user permissions? If yes, how to set 'em correctly to allow create/update but allow only to read timestamp?

View Replies !   View Related
Write Once Read Many Field
I am designing a database and one of the requirements my client has is that once data is entered into certain fields it cannot, under any circumstances, be changed. Is it possible to create a write once read many (WORM) field in MySQL directly?

View Replies !   View Related
In Best Practises; /etc/my.cnf Should Be Owned And Read Only By?
In best practises and for security; /etc/my.cnf should be owned and read only by?

Because if it is owned by root, then the default mysql user which is given to the database administrator cannot modify the start up preferences for their mysql database serve.

View Replies !   View Related
Can SQL Read From A File Or List
I'd like to do a select statement that would substitute variables from a file containing a list of strings, or a list of strings right on the command line. Here's my pseudo code:

SELECT {some value from my list, table or whatever} FROM {some list of tables in a file or other table etc}..

View Replies !   View Related

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