0
I’m having a problem in javascript do a window.open()
with a string the problem is that if the string has accents or cedilhas gives error , someone knows a way to replace the accents or cedilhas by the letter without accent or cedilhas?
0
I’m having a problem in javascript do a window.open()
with a string the problem is that if the string has accents or cedilhas gives error , someone knows a way to replace the accents or cedilhas by the letter without accent or cedilhas?
1
You can use the function encodeURI
for URL-Find the characters.
var url = 'http://my.url.com/que/tem/ç/cedilha/e/ãé/acentos';
var encoded = encodeURI(url);
window.open(encoded);
Browser other questions tagged javascript jquery
You are not signed in. Login or sign up in order to post.
I tried but it’s not working
– MANIAMAX
If encoding the accented characters doesn’t work, what do you want is to remove the accents? For example, "çaéiôü" => "caeiou"? If that’s the case, you can take a look in this matter of Soen.
– carlosfigueira