Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

ASP.Net, javascript and Accent

Posted on 2004-11-09
10
Medium Priority
?
614 Views
Last Modified: 2012-06-21
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
0
Comment
Question by:rensonnet
  • 5
  • 4
10 Comments
 
LVL 13

Expert Comment

by:nurbek
ID: 12532681
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
 
LVL 4

Expert Comment

by:vinhthuy_nguyen
ID: 12540890
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
 

Author Comment

by:rensonnet
ID: 12564171
Hi,

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

Any other idea ?

Didier RENSONNET
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 4

Expert Comment

by:vinhthuy_nguyen
ID: 12565939
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
 

Author Comment

by:rensonnet
ID: 12567524
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
 
LVL 4

Expert Comment

by:vinhthuy_nguyen
ID: 12567638
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
 

Author Comment

by:rensonnet
ID: 12592589
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
 
LVL 4

Accepted Solution

by:
vinhthuy_nguyen earned 500 total points
ID: 12594713
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
 
LVL 4

Expert Comment

by:vinhthuy_nguyen
ID: 12600667
Hi, did you solved the problem ?
0
 

Author Comment

by:rensonnet
ID: 12616353
Yes, it solved my problem !

Thanks a lot !
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question