0

As title, I have an encoded String that I got from my URL, I want to display to user but don't know how to decode it

T%E1%BB%87p t%E1%BA%A3i l%C3%AAn => Tệp tải lên

I'm using liferay 6.1 ga1, and try to create some webcontent template.

user1487380
  • 362
  • 2
  • 9
  • 26
  • I wonder where you "have" this. If something is URL-encoded, typically it is just a regular, decoded string if you read it from the parameters of an HTTP request. Could you give some more hints on which parts you're talking about? Thanks – Olaf Kock Nov 23 '12 at 08:22
  • I got this file name from url that selected in document and media field – user1487380 Nov 26 '12 at 00:39

1 Answers1

2

You can try with httpUtil, that should be available in velocity context.

$httpUtil.decodeURL("T%E1%BB%87p t%E1%BA%A3i l%C3%AAn")

would get you Tệp tải lên

Martin Gamulin
  • 3,855
  • 21
  • 25