Copy link to clipboard
Copied
Take a look at this simple javascript code fragment:
s = l.replace("à","a");
s = l.replace("è","e");
s = l.replace("é","e");
s = l.replace("ì","i");
s = l.replace("ò","o");
s = l.replace("ù","u");
After the last update of Dreamweaver (2017.0.1) the same fagment in the browser page turns into
s = l.replace("Ã ","a");
s = l.replace("è","e");
s = l.replace("é","e");
s = l.replace("ì","i");
s = l.replace("ò","o");
s = l.replace("ù","u");
Where am i wrong?
I tried changing the page properties, but nothing, everything remains the same.
The only way is to save the page with notepad with ANSI encode. However if i open with dreamweaver, dreamweaver doesn't respect the new page encode and the error comes back again.
Any help?
I understood!
Above the html and javascript code there is some rows with VB.NET code. If i remove VB code everything works.
Everyday there is something new.
Copy link to clipboard
Copied
Does this happen in a real browser when you view the source code or are you use the live preview browser in Dreamweaver when this happens?
Copy link to clipboard
Copied
This happens in a real browser source code in the real application that doesn't work, of course.
"calò" does not become "calo"
because
s = l.replace("ò","o");
is
s = l.replace("ò","o");
Copy link to clipboard
Copied
Have you got the documents charset meta tag set to:
<meta charset="UTF-8"/>
Copy link to clipboard
Copied
Yes. I 've got it.
I tried to change, but maybe i'm not be able because it's not so clear (like ansi unicode ecc.).
Could you tell me what i have to write in "charset"?
Thank you.
Copy link to clipboard
Copied
'Could you tell me what i have to write in "charset"?'
If you add the below meta tag between the <head></head> tags of your document it should solve the issue:
<meta charset="UTF-8"/>
Copy link to clipboard
Copied
But i've got it.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
that's the problem.
Copy link to clipboard
Copied
I'm not sure then because when I look at the browsers source code with the utf-8 meta tag I get this:
s = l.replace("à","a");
s = l.replace("è","e");
s = l.replace("é","e");
s = l.replace("ì","i");
s = l.replace("ò","o");
s = l.replace("ù","u");
If the meta tag is not present I get this, which is what you are seeing:
s = l.replace("Ã ","a");
s = l.replace("è","e");
s = l.replace("é","e");
s = l.replace("ì","i");
s = l.replace("ò","o");
s = l.replace("ù","u");
Do you have an actual live page which includes your script which you can link us to?
Copy link to clipboard
Copied
I understood!
Above the html and javascript code there is some rows with VB.NET code. If i remove VB code everything works.
Everyday there is something new.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now