Search code examples
ms-accessunicodespecial-characters

Microsoft Access query search for words with special character


I have a table in Microsoft Access with words that contain Romanian characters. I want to query for words that contain ț (Latin small letter T with cedilla).

The following query gives back all the entries of my table "words", just as if it was another wildcard:

 "SELECT words.[word]
    FROM words
    WHERE (((words.[word]) Like "*ț*"));

Any idea how to search for words that contain that character?

By the way, if I search for words with "ă" (Latin small letter a with breve) it works as expected.


Solution

  • The reason seems to be that "Like" uses ascii and interprets every character it can't understand as a question mark. Try this instead:

    SELECT words.[word]
        FROM words
        WHERE instr(words.[word],"ț")>0