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 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.
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.
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.
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?
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 ?
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.
Chars
How to define chars wich starts and ends string in table column. I have column varchar(10) and I try to search table with regexp but I dont have result because I dont know how to define char wich is before and after string. Everything works with like %variable% but i want to searching be more efective.
Chars
How to define chars wich starts and ends string in table column. I have column varchar(10) and I try to search table with regexp but I dont have result because I dont know how to define char wich is before and after string. Everything works with like %variable% but i want to searching be more efective.
Hex Instead Of Chars
I need to write a little Windows utility in C++ to retrieve data from a mysql database that belongs to a Linux backup program called Bacula. The data I am getting consists of hex values where I would have expected a character string e.g. instead of Abcd I get 41626364. Something to do with Unicode I expect but I can't find out how to deal with it.
1 - 2 Chars
Our fulltext index is setup to handle 3 char min_length. However, our visitors need to be able to search for certain 1-2 char phrases. In somewhere like Google I could type the phrase in quotes and get results but even with boolean syntax enabled in MySQL I still get invalid or no results for the likes of "u are u" or "PS 2". Is there a workaround aside from massively bloating our fulltext index by lowering the min_length further?
What Holds More Than 255 Chars?
right now I have a column on my data-base that is VARCHAR and holds a max of 255 characters. I need to hold more than that, but im not sure what kind of field it needs to be? also if I change the the field type from VARCHAR to whatever it needs to be...will it mess up all the data I already have in that field?
Cpecial Chars
My php form write data using addsleshes to Mysql database (if someone write ' or " in database stays ' or "). And now problem: How can I use special chars (" or ') in ,,like,, query? In command prompt I'm accessing to Mysql server and when I do select * I can see, for example, that word Rock' is supstitude with Rock' and that is OK. But I can't define like query with quotation mark (') which result with Rock' : select * from table where name like '%ock'%' - return quotation error select * from tabela where naziv like '%ock'%' - nreturn Empty set
8 Bits Chars
i am reciving an 8bit string which until today i inserted it into the mysql with smal problem of the letter mixing. now i have a jar which helps me to fix the mixing problem! for that i open a frame and use a font that i have recived in a jar : jf = new JFrame(); label2 = new JLabel("000"); label2.setSize(30, 300); label2.setFont(Font.decode("Web Hebrew AD")); jf.getContentPane().add(label2); jf.pack(); jf.setVisible(true); his do correct the mixing problem but when i try to insert it into the mysql i get only ?
SELECT Only First 20 Chars
If this is a really simple question I apologise. I'm almost certain there is a way to do this, I just can't find it out.I want to SELECT the first 20 characters in a column using a SELECT query. eg. if the column contains a really long text entry then all I want is the first 20 characters to be returned by the query. If less than 20, obviously I want it aswell.
Longer Than 255 Chars
I am here trying to learn MySQL and I have a freewebhost so I'm here just running a bunch of queries through its PHPmyAdmin, still learning.. I am wondering.. How do databases like this forum store values into columns (i suppose?) that are longer than 255 characters? or am I missing something here, I probably am.. can someone shed some light? edit:Oh Nevermind. Just found out about 'text' online somewhere else.. yeah i thought something like that existed.. read a while back.. Hey does anyone know of any good up-to-date MySQL resource pages?
String With 6 Chars
i have colums with FULLTEXT keys, and performing search by selecting from table with MATCH AGAINST. Now, my ft_min_word_length is set to 4 (and my provider "can't" change it). I understand i can't search for words with length less than 4, but why doesn't mysql server consider "AB-123" as word with 6 chars. I have entries in my table like, "AB-123", and let's say "AB-1234". if I search for "AB-123" it returns nothing, if i search for "ab-1243" it select right row
Problems With Special Chars
I had to move from my hosting and I needed to export my MySQL databases. I did it via the phpmyadmin panel, imported via shell to the new host and everything ran smooth. However, I found some problems when special characters: instead of á, it converted as %a, and so on. I found out that all the special characters were "lost" in the migration proccess, but luckily all of them follow the same pattern: á became %a, é became %e... so it should be easy to do a massive replacement. My question is: what kind of script/query do I have to do in order to fix these special characters on the fly? (I already thought about the possibility of exporting it again to a .sql file, replace it with a text editor and reimport it again, but the database is so big (1200mb), and usage is very high so I'd prefer to do this "on the fly" with a script and UPDATE queries, if possible)
Non Alphanumeric Chars Appearing As ?
I have a site which pulls content from a mysql database. Any non-alphanumeric character is displayed as a question mark. I noticed in phpmyadmin the collation was latin1_swedish_ci and thought this may be something to do with it. Can anyone confirm this for me? If this is the case, what should the collation be and how do I change it?
Include Any Chars From [0-9] In Like Query
Im trying to write a like query: select * from table1 where column1 like 'abc[0-9]%' (I realize this syntax isnt correct) I want to include any chars from 0-9 in that spot... Does anyone know how to do this?
Special Chars After Upgrade
after upgrading my MySQL-DB from version 3.23 to 4.1.1 on a Linux machine, I can't type section symbols(§) in the MySQL monitor any more.
Store More Chars In A Field
Is there a way to store say 2000 charecters in a field? I thought varchar is limited to 255, but I would like to store about 2000-3000. What field type would accomidate that, if any? Or do I need to write text files?
Filtering Special-chars
I want to fetch the page via php from a mysql-db, which is called by an emulated filename (mod_rewrite, but that might be unimportant). So I have a file, which is called by guestbook.html - so I have to find the entry in my db, where the page title is guestbook. But there isn't a only column for this virtual filenames, but only entries like "Guestbook", "This & much more..." and so on. Becaus I'm not able to use "This & much more..." or thinks like this as filenames, I have first have to bring the letters to lower case and then to filter all the special chars. but how can i do this? Code:
Filtering Special-chars
I want to fetch the page via php from a mysql-db, which is called by an emulated filename (mod_rewrite, but that might be unimportant). So I have a file, which is called by guestbook.html - so I have to find the entry in my db, where the page title is guestbook. But there isn't a only column for this virtual filenames, but only entries like "Guestbook", "This & much more..." and so on. Becaus I'm not able to use "This & much more..." or thinks like this as filenames, I have first have to bring the letters to lower case and then to filter all the special chars. but how can i do this? because it is for a german cms, I first translate ä,ö,ü,ß my current solution (whitout replacing special chars) is this: WHERE REPLACE ( REPLACE ( REPLACE ( REPLACE ( LOWER( pagetitle ) , 'ö', 'oe'), 'ä', 'ae'), 'ü','ue'), 'ß','ss') LIKE 'guestbook' the column pagetitle has in one entry the value "Guestbook" - but how can i find a entry "This & much more..." - how to delete whitespaces, &, . and the other chars that are not numbers or digits? doing this at reading from the db has the benefit that I don't have to do so many hacks in the cms as when I would do it at inserting. The problem of the performance might be not so heavy (if I wouldnt have to use much more Replace (...)), becaus the cms is just for small pages which are hosted on shared hosting servers.
SELECTing WHEN Chars >= 4000
I have a table of articles, and each article has a "chars" field storing the number characters it has. There are two kinds of SELECTs I'm looking to do: 1: Select until @var >= 4000. So MySQL would select a row, increment the variable by 'chars', and then check to see if it's >= 4000 before continuing. 2: Select five rows that appear AFTER the first 4000 characters. So, five rows after whatever rows were selected in #1. Is this sort of thing doable in a query, without the use of PHP? If not, then oh well. The problem is that I'm doing the first query by selecting 10 rows, then using PHP to go through and get 4000 characters, then discard the rest. Then, and here's the bugger, I cache the output. Later on the page, I show five "most recent" articles using a variable set in the now-cached output to tell the query at which row to start pulling (WHERE id <= $last_id). When the first bit's been cached, the script doesn't run and the variable isn't then. Then the next bit on the page just errors out because it has nothing to go on.
Count Chars In Field
I need to know how to select from a field where the total number of chars in the field is less than 5.
Chars In Mysql Query
If a user search for a word like 'caño' he gets results containing both 'caño' and 'cano'. I don't want to extend searches in words with 'n' instead of 'ñ'. But I also want to keep such extension when a user is looking for a word with an ' á ' , results contain both ' a ' and ' á '
Getting Records Based On Chars In A String
I have a table with 2 fields. Field 1 contains Names. Field 2 contains a single character A,B,C,D or E. I have a string "BCE" for which I want all the names that contain one of those characters (B,C, or E). For Example: Field1 ====== Jo Ron Mary Sue Mark Frank Field 2 ======= E D A C D B Desired Result after Query: =========================== Frank Sue Jo SELECT * from TestTable Where Field2 = SomeFunction("BCE") How can I do this using a SELECT statement?
Table Words With Special Chars
Using Perl v5.8.5 + MySQL v4.1.9 on Linux FC2. I'm trying to parse a UTF-8 document (<?xml version="1.0" encoding="UTF-8"?>), and store it into a MySQL database (Collation: utf8_bin). The document contains special characters ('música española' for instance), and after storing it into de DB, I get this word: "música española" How can I store words with special characters
Preoblemwith Displaying Utf8 Chars In Web Site
I have the following problem: I have a database entries with cyrillic characters and I cannot display them in my website (instead I get "?????"). I have set the files for the website in utf-8 character encoding and all the static characters in the web site are show as they should. The according table is in utf8_general_ci encoding and all the system character-/collation- variables are in utf8/utf8_general_ci encoding. I would be very thankful for some help! P.S. character set client utf8 character set connection utf8 character set database utf8 character set filesystem binary character set results utf8 character set server utf8 character set system utf8 collation connection utf8_general_ci collation database utf8_general_ci collation server utf8_general_ci
DB Export/import - Problem With Special Chars
I exported a database scheme using PhpMyAdmin (MYSQL40 compatible SQL-file). That worked well. Windows Notepad displayed all the special characters (umlauts [German ones], trademark symbols and so on) correctly. Then I used PhpMyAdmin to import the scheme to a different server. The software imported the sql file without giving any error messages. But all the special characters in the new scheme are broken. It replaced characters like ö (an o with 2 dots on it - HTML entity ö [for users whose browser can't display it]) with ö (two strange chars). I can't find any character set settings in the SQL file. So I think that the server defaults were used. I loggedin at phpMyAdmin with iso-8859-1 as language. Does anybody know this problem? What do I do wrong?
Windows-1254 Non-latin Chars Are Replaced
MySQL 3.23.48 I am entering windows-1254 encoded non-latin chars such as ç, ü, ö into a MySQL 3.23.48 db but they are appearing in the db/html code as ç for ç, ü for ü and ö for ö. Every time I need to issue a find/replace command. Since no encoding had naturally been defined in the beginning I do not know what is causing this problem.
|