Character encoding changes after window.open()

character-encoding, encoding, hyperlink, javascript, utf-8

Solution

I had the same problem. Just use `unescape(decodeURIComponent( YOUR_URL ))` inside `window.open()`.

For example: `window.open(unescape(decodeURIComponent( YOUR_URL )), '_blank');`

Hope it helps.

Problem

The site from where I'm calling the `window.open()` function is in UTF-8, using the `<meta>` tag, everything works well, but once I call the function and open another window with the same tag, the new window shows weird characters even thought in page info it shows that the encoding stays the same (UTF-8). This is the same problem as mine: http://bytes.com/topic/javascript/answers/622922-character-encoding-after-window-open

Original source