SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Accents in MySQL?

    Hi,

    Is the recognition of accents and special characters a user-setting / configuration in MySQL?

    On my local developement version of a current project I can search for "miro" and it returns a result (correctly) for Joan Miró. On the identical version of the site hosted at the clients ISP the same search returns no results (as I assume it expects the accent).

    It's a fairly basic search with a SELECT statement as follows:

    SELECT * FROM biografias WHERE tipo = 1
    AND nombre LIKE '%$search_words[0]%'
    AND nombre LIKE '%$search_words[1]%'
    AND nombre LIKE '%$search_words[2]%'"

    Note: the search_words were split as the client has names entered in reverse in the Db... (doh!)

    Is there anything I can do to get around the accent issue or is this simply the result of the ISP settings?

    Gary

  2. #2
    SitePoint Enthusiast xev's Avatar
    Join Date
    Jan 2002
    Location
    USA
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It should work as long as the column is not binary (such as blob). Also, make sure you have a recent version of MySQL. Older versions treated LIKE as a binary search. You can see the documention for case sensitivity here:

    http://www.mysql.com/doc/C/a/Case_sensitivity.html
    Last edited by xev; Feb 27, 2002 at 19:13.

  3. #3
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Xev,

    Thanks for your comments. The text in question is just a standard Db entry (a name) but unfortunately I have no access to the live configuartion as is hosted at client ISP. But I found it strange that the live behaviour differed from my local copy on this issue.

    Thanks again and will check the MYSQL pages...

    Gary


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
  •