Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7588279
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T19:53:02+00:00 2026-05-30T19:53:02+00:00

I have a javascript file linked externally. And inside that javascript, I have this

  • 0

I have a javascript file linked externally.
And inside that javascript, I have this function:

function getMonthNumber(monthName){
monthName = monthName.toLowerCase();
if(monthName == 'janvier'){
    return "01";
}else if(monthName == 'février'){
    return "02";
}else if(monthName == 'mars'){
    return "03";
}else if(monthName == 'avril'){
    return "04";
}else if(monthName == 'mai'){
    return "05";
}else if(monthName == 'juin'){
    return "06";
}else if(monthName == 'juillet'){
    return "07";
}else if(monthName == 'août'){
    return "08";
}else if(monthName == 'septembre'){
    return "09";
}else if(monthName == 'octobre'){
    return "10";
}else if(monthName == 'novembre'){
    return "11";
}else if(monthName == 'décembre'){
    return "12";
}

}

But, when I read it in Firebug, I see:

function getMonthNumber(monthName){
    monthName = monthName.toLowerCase();
    if(monthName == 'janvier'){
        return "01";
    }else if(monthName == 'février'){
        return "02";
    }else if(monthName == 'mars'){
        return "03";
    }else if(monthName == 'avril'){
        return "04";
    }else if(monthName == 'mai'){
        return "05";
    }else if(monthName == 'juin'){
        return "06";
    }else if(monthName == 'juillet'){
        return "07";
    }else if(monthName == 'août'){
        return "08";
    }else if(monthName == 'septembre'){
        return "09";
    }else if(monthName == 'octobre'){
        return "10";
    }else if(monthName == 'novembre'){
        return "11";
    }else if(monthName == 'décembre'){
        return "12";
}
} 

So that, basically all the accents were encoded.

As far as I found on the net, passing the charset to the script should fix that, but even though I tried passing charset="utf8" or charset="ISO-8859-1", none seems to work.

I’m not sure how to fix that. Any ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T19:53:03+00:00Added an answer on May 30, 2026 at 7:53 pm

    As stated by JKirchartz and Šime Vidas, the answer was to make sure to save the file in the right charset.
    Basically, dreamweaver was not saving it the good charset, but Eclipse does.
    So I removed the charset attribute on the script and just saved it in the good charset and now it works.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have javascript code embedded inside a html template file. When I load this
I have a javascript file that reads another file which may contain javascript fragments
I have a lengthy JavaScript file that passes JSLint except for used before it
I have a simple JavaScript file that has three jQuery $document.ready functions. All three
I have some code in a javascript file that needs to send queries back
I have a JavaScript file which has a hard coded BASEURL variable, this value
I have a javascript file with a global object that must not be renamed
I have a javascript file linked to a PHP page which has a value
I have external JavaScript file with simple document.write() call. Problem is that a tag
If you have one HTML file, that has multiple scripts linked in the header,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.