Search code examples
mysqlcharacter-encodingutf-16

Query MySQL with unicode char code


I have been having trouble searching through a MySQL table, trying to find entries with the character (UTF-16 code 200E) in a particular column.

This particular code doesn't have a glyph, so it doesn't seem to work when I try to paste it into my search term. Is there a way to specify characters as their respective code point instead for a query?

Thanks, -Ben


Solution

  • Not tested, but CHAR() could work for this:

    CHAR(0x200E);
    

    I can't set up a full test case right now, let us know whether it worked.