Share via

URL decode

Anonymous
2013-03-25T15:52:32+00:00

When I save links in a URL field, some characters are converted to hex character. For example

URL1:  http://es.wikipedia.org/wiki/Tomás_Arias_Marín_de_Cubas

Is converted to

URL2:   http://es.wikipedia.org/wiki/Tom%C3%A1s_Arias_Mar%C3%ADn_de_Cubas

Please, for example note "á" converted to "%C3%A1".

How can I quickly uncode URL2 to return URL1 using Access Visual Basic?.

I have found something as "httpUtility.UrlDecode" method in .Net or "decodeURIComponent" in Java, but nothing similar in MSAccess VB

Thanks in advance - Huaca

=======================

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2013-04-08T18:04:00+00:00

    The code is very much cleaner that the implementation I found on the web, but when running it I get

    "Run-time Error 429: ActiveX component can't create object".

    Searching the web, it seems that it is not possible to create the object in 64bits MSAccess, which is my case (see here). But I am not sure.

    Many thanks for your help.

    Huaca

    =================

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2013-04-06T22:47:43+00:00

    How about:

    Function decodeURL(str As String)

        Dim ScriptEngine    As Object

        Set ScriptEngine = CreateObject("ScriptControl")

        ScriptEngine.Language = "JScript"

        ScriptEngine.AddCode "function decode(str) {return decodeURIComponent(str);}"

        decodeURL = ScriptEngine.Run("decode", str)

        Set ScriptEngine = Nothing

    End Function

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2013-04-06T17:34:51+00:00

    After a very hard web search I have found a solution at

    http://home.telfort.nl/~t876506/utf8tbl.html#algo

    Was this answer helpful?

    0 comments No comments