4

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

Ben
  • 7,692
  • 15
  • 49
  • 64

1 Answers1

4

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.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • Didn't have any luck, but this might be the right path and I'm just getting some details wrong. I tried: where column like CHAR(37, 0xE2808E using utf8); 0xE2808E is the UTF-8 encoding for this code point. Not sure what else I can do =/ – Ben Jun 11 '10 at 23:08
  • 3
    @Ben if you're searching for that character among others, I think you need `%`: `WHERE column LIKE CONCAT("%", CHAR(0xE2808E using utf8), "%");` this could indeed be down to details and trial&error... – Pekka Jun 11 '10 at 23:12