codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Javascript problem with document.write and accented characters  steph2004 at 22:00 on Tuesday, January 03, 2006
 

Hi,

I have a web page where I put a javascript and where its source is an ASP.NET application. So it looks like this:

<script language="javascript" src="/js.aspx type="text/javascript"></script>

This web page has the meta tag for encoding:

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

The ASP page is printing some document.write with data taken from a database. If I go directly to the js.aspx page, I see this:

document.write('Mon père a été là');

The french accent are there which is good.

But when I go to my test page, I see things like this:

"Mon père a ètè lè"

All the french accent have been converted in a non-readable format.

I tried to put the charset property to the script tag (charset="iso_8859-1") and it doesn't work. I also check encoding of my ASP page but it still doesn't work.

After googling a lot in vain, I hope I'm not the only having this problem!

Any idea or any solution??

Thanks!

Stephane

  Re: Javascript problem with document.write and accented characters  steph2004 at 17:48 on Wednesday, January 04, 2006
 

I've done a lot of things and it's working now... I'm not 100% sure but it seems it's because I added responseEncoding="iso-8859-1" to the ASP.Net Page directive.

It works now so I won't touch it again! :)

Steph








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Database Search
•  Access https in http page
•  IE page Redirect
•  Re: Javascript problem with document.write and accented characters
•  Re: sorting and Linked list
•  Re: need help linked list
•  Re: Help with arrays
•  Re: Reading from a file
•  Re: Why Use Method?


Recent Articles
Multiple submit buttons with form validation
Understanding Hibernate ORM for Java/J2EE
HTTP screen-scraping and caching
a javascript calculator
A simple way to JTable
Java Native Interface (JNI)
Parsing Dynamic Layouts
MagicGrid
Caching With ASP.Net
Creating CSS Buttons


© Copyright codetoad.com 2001-2006