AnsweredAssumed Answered

WebScript URL encoding

Question asked by sergi.l on Jan 14, 2010
Latest reply on Dec 31, 2010 by artem
Hi all!

Easy question.
I'm publishing an Alfresco WebScript as simple as:

mytest.get.desc.xml
<webscript>
   <shortname>test</shortname>
   <description>my test</description>
   <url>/sls/mytest?parametro={parametro}</url>
   <authentication>guest</authentication>
   <transaction>none</transaction>   
</webscript>

mytest.get.html.ftl
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1" >
</head>
<body>
resultado: ${args.parametro}
</body>
</html>

If I send: http://localhost:8080/alfresco/service/sls/mytest?parametro=test
The result is: test

If I send: http://localhost:8080/alfresco/service/sls/mytest?parametro=É
The result is: �

If I send: http://localhost:8080/alfresco/service/sls/mytest?parametro=ñ
The result is: �

That's to say. Why these special characters are not being shown??
How can I configure my webscripts to manage the URL encoding and to show the corresponding character??

Sending the same characters encoded causes the same output :(
Ñ  –> %D1 (http://www.w3schools.com/TAGS/ref_urlencode.asp)
If I send: http://localhost:8080/alfresco/service/sls/mytest?parametro=%D1
The result is: �
Same result!!

Please, help!
Many thanks,

Sergi

Outcomes