Skip to main content
Inspiring
February 13, 2017
Answered

Problems with accent marks

  • February 13, 2017
  • 1 reply
  • 892 views

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?

    This topic has been closed for replies.
    Correct answer mario.t

    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?


    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.

    1 reply

    Legend
    February 13, 2017

    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?

    mario.tAuthor
    Inspiring
    February 13, 2017

    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");

    mario.tAuthorCorrect answer
    Inspiring
    February 13, 2017

    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?


    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.