<div class="gmail_quote">On 1 July 2011 13:23, Carlo Bertoldi <span dir="ltr"><<a href="mailto:carlo.bertoldi@ubiquity.it">carlo.bertoldi@ubiquity.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

On 01/07/2011 14:17, Chandru wrote:<div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 1 July 2011 10:10, Carlo Bertoldi <<a href="mailto:carlo.bertoldi@ubiquity.it" target="_blank">carlo.bertoldi@ubiquity.it</a> <mailto:<a href="mailto:carlo.bertoldi@ubiquity.it" target="_blank">carlo.bertoldi@<u></u>ubiquity.it</a>>> wrote:<br>


<br>
    Hello again,<br>
     I believe this is a quite common problem, but I couldn't find an<br>
    answer to my problem.<br>
    I'd like to URL encode/decode strings.<br>
    Encoding: edoc_lib:escape_uri("hello hello"). Perfect, but how can<br>
    I go back to the original string now?<br>
    Is it possible to do it without using external libs, as those<br>
    found in Yaws, or ibrowse? or I'll have to include one of those in<br>
    my project?<br>
<br>
<br>
The http_uri module which is part of inets is probably what you need.<br>
<br>
cheers<br>
Chandru<br>
<br>
</blockquote></div></div>
Hi Chandru, I looked into http_uri module, but it only exports the parse function:<br>
<br>
http_uri:parse("<a href="http://try.com/ciao%20ciao" target="_blank">http://try.<u></u>com/ciao%20ciao</a>").<br>
{http,[],"<a href="http://prova.com" target="_blank">prova.com</a>",80,"/<u></u>ciao%20ciao",[]}<br>
<br>
This doesn't solve my problem.<br>
<br></blockquote><div> <br>I thought you wanted to URL encode and decode strings. So are the encode and decode functions in that module not sufficient?<br><br>8> edoc_lib:escape_uri("hello hello").<br>"hello%20hello"<br>

<br>9> http_uri:decode(v(-1)).<br>"hello hello"<br><br>Chandru<br><br></div></div>