1

in my Android app I use this method:

URLDecoder.decode(this.name,"UTF-8")

It decodes the name sent from my server side, where, in PHP, I use:

urlencode($name);

Apparently, this is not working. I want the name to show with national characters. Could you help me how to solve this problem? Thanks in advance.

2
  • I think you are doing it right. Let's make some test: Initial string: $name = "test-€$ț" ; Encoded string with urlencode($name): test-%E2%82%AC%24%C8%9B ; Decoded string with URLDecoder.decode(name, "UTF-8"): test-€$ț Commented Apr 9, 2013 at 21:31
  • Finally, the problem was solved using an answer below. Commented Apr 10, 2013 at 10:03

1 Answer 1

2

On the server side try:

urlencode(utf8_encode($name));
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.