How to convert Unicode string to UTF8String?

From: Pham Toan Thang (phamtoanthang_at_yahoo.com)
Date: 11/27/03


Date: 27 Nov 2003 00:21:03 -0700


Hi,
I am using Delphi 7, MS Access DB 2000. As I know that, when a field with Memo type stores Unicode data, it compressed data in UTF8 format.

So that, in order to make query on this memo field, I have to create the query command in UTF8 format. But I don't know how to convert Unicode string (or WideString) to UTF8string.

For example:
Unicode ==> UTF8 string
--------------------------------
Việt Nam Vi\u7879?t Nam
ệ \u7879?
--------------------------------
I used function UTF8Encode but it doesn't work correctly.
Which function can I use to do that?

Thanks,
Pham Toan Thang