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
On Twitter: https://twitter.com/MySQLWorkbench
On Slack: mysqlcommunity.slack.com (#workbench)
Report bugs to http://bugs.mysql.com
MySQL documentation can be found here: http://dev.mysql.com/doc/refman/8.0/en/



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

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to store Hindi characters in MYSQL database
42644
May 02, 2006 01:23AM


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.