ASP.Net, javascript and Accent

Hi,

I developped a web application in ASP.Net
Some pages contains advertising javascript but special character like "french accents" are not displayed correctly.
Take a look at http://www.willgoto.com/liens.aspx?Category=29299&Langue=1 
On the right there is a dropdown list where "Hôtels" is replaced by "H?s" and "Séjours" by "S#jours"

I asked the advertising company and they said :
The problem is coming from the encoding of the page
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
EN = English

Does anyone have an idea ?

Thanks,

Didier RENSONNET
rensonnetAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nurbekCommented:
try give page directives

i am not sure on uiCulture="fr-FR"
i dont know the french uiCulture

<%@ Page Language="vb" LCID=1036  uiCulture="fr-FR"%>
0
vinhthuy_nguyenCommented:
Or you can edit the web.config
 <system.web>
    <globalization
       fileEncoding="utf-8"
       requestEncoding="utf-8"
       responseEncoding="utf-8"
       culture="fr-FR"
       uiCulture="fr-FR"
    />
  </system.web>
0
rensonnetAuthor Commented:
Hi,

I tried both proposed solutions but it doesn't solve the problem.

Any other idea ?

Didier RENSONNET
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

vinhthuy_nguyenCommented:
Hi, I've just checked again your site, and when I choose text encoding with 'Western European' , everything shows as you expected.
So I think your advertising company was right :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//FR"> will works.
0
rensonnetAuthor Commented:
Hi vinhthuy_nguyen,

Did you look at the code of the page http://www.willgoto.com/liens.aspx?Category=29299&Langue=1 ?

Because this page already has the <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//FR"> code

Didier RENSONNET
0
vinhthuy_nguyenCommented:
Hi,
Yes, that page. Can you try again with
<system.web>
    <globalization
       fileEncoding="Windows-1252"
       requestEncoding="Windows-1252"
       responseEncoding="Windows-1252"
       culture="fr-FR"
       uiCulture="fr-FR"
    />
  </system.web>
0
rensonnetAuthor Commented:
Hi,

I just tried what you asked me but when I put
<globalization fileEncoding="Windows-1252" requestEncoding="Windows-1252" responseEncoding="Windows-1252" culture="fr-FR" uiCulture="fr-FR" />
In my webconfig file, I got the error :

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.
Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".
<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>
 Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.
<!-- Web.Config Configuration File -->
<configuration>
    <system.web>
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
    </system.web>
</configuration>
 
So I just tried to put in my webconfig file :
<globalization requestEncoding="utf-8" responseEncoding="utf-8" culture="fr-FR" uiCulture="fr-FR" />

But I doesn't change anything at my problem :
http://www.willgoto.com/liens.aspx?Category=29299&Langue=1

Didier RENSONNET
0
vinhthuy_nguyenCommented:
Hi,
acctually it works on mine, I copied your HTML code to a aspx file on my coomputer and change web.config to
 <globalization requestEncoding="windows-1252" responseEncoding="windows-1252" />
and the FR language is displayed ok.
Pls check again
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
vinhthuy_nguyenCommented:
Hi, did you solved the problem ?
0
rensonnetAuthor Commented:
Yes, it solved my problem !

Thanks a lot !
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.