Delphi 10, .NET, how do I convert a hex UTF-8 string to its unicode character?

Posted by Evan V. on Stack Overflow See other posts from Stack Overflow or by Evan V.
Published on 2010-03-15T17:39:11Z Indexed on 2010/03/15 17:39 UTC
Read the original article Hit count: 476

Filed under:
|
|

Hi all,

I am trying to make my web app compatible with international languages and I am stuck with trying to convert escaped characters in my Delphi .NET DLL.

The front end code is passing the UTF-8 hex notation with an escape character e.g for ? I pass \uE3818A. In my DLL I capture this and constract the following string '$E3828A'. I need to convert this back to ? and send it to my database, I've been trying to use Encoding.UTF8.GetBytes and Encoding.UTF8.GetString but with no luck.

Anyone could help me figure this out?

Thank you.

© Stack Overflow or respective owner

Related posts about utf-8

Related posts about delphi-2006