1

I have little problem. I'm Polish, and i need polish characters on my site.

When i try to set title, there's no problem, i can set polish characters, and everything is displayed well. But when i try to set Value, there's some mess in my address bar. When i try to make:

"Masaże i SPA" i get:

"Masa%C5%BCe%20i%20SPA".

I've searched on google, but there's no specific solution to my problem.

What i'm trying to do, is send URL to HTML, but it encodes it wrong way.

Is there any solution for that?

Thanks for any help.

MaxGenius
  • 23
  • 4

1 Answers1

4

Why is it surprising to you, that setting the URL value (not the page title, mind you) of your browser's address bar outputs a string that is (properly, by the way) url-encoded?

If you want to set the page title, use setTitle() instead of setValue().

EDIT

See this page to find out why special characters in URLs need to be encoded.

weltraumpirat
  • 22,544
  • 5
  • 40
  • 54
  • You dont uderstand me. I want to set address (not title) to look more readfull. I want it to look like www.mywebsite.com/#/Masaże_i_SPA, while now it looks like www.mywebsite.com/#/Masa%C5%BCe%20i%20SPA – MaxGenius Dec 18 '11 at 16:25
  • I understand very well. You could remove the spaces from the URL, then no %20s will appear. And if you substitute something else for your special characters, there will be no %s at all. Then it will be more readable. See my edit above. – weltraumpirat Dec 18 '11 at 16:58