SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jul 2004
    Location
    Winnipeg, MB
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Sort Order on a column with accented characters

    Hello all,

    I am presently building a site and being in Canada one of the requirement is that it be in both French and English. Some of the forms on the site require the user to select their Country. We are using a reference table in mysql to seed the selection list. The schema for the table is below:

    CREATE TABLE `countries` (
    `ID` int(11) unsigned NOT NULL auto_increment,
    `ISO` char(2) default NULL,
    `en` varchar(255) default NULL,
    `fr` varchar(255) default NULL,
    PRIMARY KEY (`ID`),
    UNIQUE KEY `ISOCode` (`ISO`)
    ) TYPE=MyISAM


    My problem is getting the correct sort order for the French (fr) column. Some countries names start with accented characters (eg. United States = États-Unis). Which does not show up with the "E"'s when I do an " ORDER BY fr".

    I suspect it has something to do with character-types, but I do not know much about them. Any help would be greatly appreciated.

    Thnks

    Peer

  2. #2
    SitePoint Wizard Dean C's Avatar
    Join Date
    Mar 2003
    Location
    England, UK
    Posts
    2,906
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •