Submitted by matejcik (not verified) on Tue, 2004-11-02 04:46.
martin: odcesti->odčešti :e))
the "odcesti" means "unczech"...
what this code does, is to remove diacritics (signs above letters in czech) in the query word, and tests the "unczeched" word against similarly unczeched word in the database.
those hex codes mean letters with diacritics
i'll try to show, but i'm unsure about how this will be displayed... submitting those in utf-8 so switch your charset:
á -> a
č -> c
ě -> e
é -> e
ň -> n
ř -> r
ů -> u
and so on and so on.
the way to do this properly ... well, not to do it at all. either strip diacritics before insertion into db, or use consistent character set and search without translation.
or is there something like strtr for a database?
the "odcesti" means "unczech"...
what this code does, is to remove diacritics (signs above letters in czech) in the query word, and tests the "unczeched" word against similarly unczeched word in the database.
those hex codes mean letters with diacritics
i'll try to show, but i'm unsure about how this will be displayed... submitting those in utf-8 so switch your charset:
á -> a
č -> c
ě -> e
é -> e
ň -> n
ř -> r
ů -> u
and so on and so on.
the way to do this properly ... well, not to do it at all. either strip diacritics before insertion into db, or use consistent character set and search without translation.
or is there something like strtr for a database?