MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 2nd, 2003, 01:34 AM
mruhul mruhul is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 48 mruhul User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 6 h 59 m 4 sec
Reputation Power: 7
Unhappy japanese character sorting

Hi all,

In my mysql database i have stored accounts name in japanese character. All accounts has been displayed in a page sort by name. So i use "ORDER BY name" in my query. But my client complain that the names are not sorted correctly.

Is there anything i have to do in case of japanese or non-english character sorting? please help....

thanks in advance.
__________________
ruhul

Reply With Quote
  #2  
Old September 2nd, 2003, 04:52 PM
HarrisonF HarrisonF is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Oct 2002
Location: Binghamton, NY
Posts: 536 HarrisonF User rank is Sergeant (500 - 2000 Reputation Level)HarrisonF User rank is Sergeant (500 - 2000 Reputation Level)HarrisonF User rank is Sergeant (500 - 2000 Reputation Level)HarrisonF User rank is Sergeant (500 - 2000 Reputation Level)HarrisonF User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 15 h 35 m 55 sec
Reputation Power: 20
It will depend on which character set you are using.
Prior to MySQL 4.1 you can only specify the character set for the entire server. To do so you use the --default-character-set option. For japanese you would most likely want sjis or ujis. So in your config file you could use:
Code:
[mysqld]
default-character-set=sjis

In MySQL 4.1 you can now specify both character set and collation down to the column level (More complete than most RDBMSs). To read more about that check out http://www.mysql.com/doc/en/Charset.html

Reply With Quote
  #3  
Old November 7th, 2004, 10:02 AM
macgruder's Avatar
macgruder macgruder is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Location: Japan
Posts: 251 macgruder User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 52 m 54 sec
Reputation Power: 9
Resurrecting this topic. I think the problem here is more than one of just collation. There is no way to easily order Japanese unless your characters are all in kana (hiragana or katakana).

A simple case:
Suppose you have the Kanji

nihon (??)
hi (day - ??)

There is no way for mysql to know whether the kanji for day is read 'hi' or 'ni' etc and so it can't order them. On the other hand, if you are ordering kana, you can go with the previous suggestion.

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > japanese character sorting


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT