rensonnet
asked on
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
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
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>
<system.web>
<globalization
fileEncoding="utf-8"
requestEncoding="utf-8"
responseEncoding="utf-8"
culture="fr-FR"
uiCulture="fr-FR"
/>
</system.web>
ASKER
Hi,
I tried both proposed solutions but it doesn't solve the problem.
Any other idea ?
Didier RENSONNET
I tried both proposed solutions but it doesn't solve the problem.
Any other idea ?
Didier RENSONNET
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.
So I think your advertising company was right :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//FR"> will works.
ASKER
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
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
Hi,
Yes, that page. Can you try again with
<system.web>
<globalization
fileEncoding="Windows-1252 "
requestEncoding="Windows-1 252"
responseEncoding="Windows- 1252"
culture="fr-FR"
uiCulture="fr-FR"
/>
</system.web>
Yes, that page. Can you try again with
<system.web>
<globalization
fileEncoding="Windows-1252
requestEncoding="Windows-1
responseEncoding="Windows-
culture="fr-FR"
uiCulture="fr-FR"
/>
</system.web>
ASKER
Hi,
I just tried what you asked me but when I put
<globalization fileEncoding="Windows-1252 " requestEncoding="Windows-1 252" respo nseEncodin g="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="mycustomp age.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
I just tried what you asked me but when I put
<globalization fileEncoding="Windows-1252
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="mycustomp
</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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi, did you solved the problem ?
ASKER
Yes, it solved my problem !
Thanks a lot !
Thanks a lot !
i am not sure on uiCulture="fr-FR"
i dont know the french uiCulture
<%@ Page Language="vb" LCID=1036 uiCulture="fr-FR"%>