unicode characters to UTF-8(Hex)

Posted on 2011-04-27
Last Modified: 2012-08-14
Hi all,

I am trying to make my application compatible with international languages and I am stuck with this problem.

I'm trying to pass Unicode string as a URL  parameter but It need to be converted to HEX UTF-8 string in order to pass it.

Anyone could help me to convert unicode string to HEX UTF8?

Thank you.
Question by:MissManal
    LVL 2

    Expert Comment

    try the below code,

    function urlencode(c:char):string;

    and for a complete string you can use:

    function urlencodestring(const s:string):string;
    i: integer;
    for i:=1 to length(s) do
    and then you can use it easily like

    Open in new window

    Also try using,

    TEncoding.Unicode.GetString( MyByteArray );

    Open in new window

    Source: google
    LVL 32

    Accepted Solution


    This is similar to the previous question

    Use UTF8Encode

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    This video discusses moving either the default database or any database to a new volume.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now