MySQL Forums :: Character Sets, Collation, Unicode :: How to store Hindi characters in MYSQL database


Advanced Search

Re: How to store Hindi characters in MYSQL database
Posted by: Mike Lischke ()
Date: May 02, 2006 01:23AM

Sanjay Subramanyam wrote:

> 1. What should be the table defination to allow us
> to store hindi fonts

I'm not sure I understand you. Do you want to store font files in your database? Or do you rather want to store strings that contain Hindi text? Usually you install fonts in your system, but do not store them in a database.

For storing Hindi text in a MySQL table specify a Unicode encoding either for your table or the entire schema. See http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html for available encodings. For you UCS2 (which is, except for surrogates, identical to UTF-16) or UTF-8 are the ones to go with. Generally it is always a good advise to go with Unicode encoding if you have text in more than one language or a language (like Hindi) that does not have an ANSI code page. See http://www.unicode.org/faq/utf_bom.html for more details about UTF-8, UTF-16 etc.

> 2. Do we need to make any changes to the MYSL
> instance so that when we query it using MYSQL
> query browser it shows us the data in hindi.

No other change is necessary. Just use the proper encoding (Unicode) and you are done. MySQL Query Browser internally uses UTF-8.

> 3. How do we handle the fetching and display of
> this font in Java.

Again, you cannot fetch fonts from a database, unless you really mean to store (font) files there (e.g. in a blob).

> Another point: our customer has entered huge
> amounts of data in XL and the font are Hindi. I
> need to convert this to MYSQL is there any free
> tool which can convert them directly or do i need
> to make it a CSV and import it to the DB.

I don't know XL, but maybe it can dump the content into an SQL file? If this is standard SQL it would be quite easy to import it into MySQL. Also other file formats are possible (see http://dev.mysql.com/doc/refman/5.0/en/load-data.html), but make sure the file uses a Unicode encoding (most likely UTF-8).

Mike

Mike Lischke, MySQL Developer Tools
Oracle Corporation

MySQL Workbench on Github: https://github.com/mysql/mysql-workbench
MySQL Workbench on Twitter: https://twitter.com/MySQLWorkbench
Report bugs to http://bugs.mysql.com
MySQL documentation can be found here: http://dev.mysql.com/doc/refman/5.7/en/



Edited 1 time(s). Last edit at 05/02/2006 01:27AM by Mike Lischke.

Options: ReplyQuote


Subject Views Written By Posted
How to store Hindi characters in MYSQL database 10399 Sanjay Subramanyam 04/29/2006 08:43AM
Re: How to store Hindi characters in MYSQL database 22967 Mike Lischke 05/02/2006 01:23AM
Re: How to store Hindi characters in MYSQL database 5058 manoj kumar 01/25/2008 06:47AM
Re: How to store Hindi characters in MYSQL database 4241 Hemant upadhyay 03/18/2008 06:17AM
Re: How to store Hindi characters in MYSQL database 6660 anuja pareek 03/07/2008 11:16PM
How to retrive Hindi characters from MYSQL database 3554 Shrikant Pawade 04/04/2009 06:21AM
Re: How to retrive Hindi characters from MYSQL database 3481 Rick James 04/04/2009 11:00PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.