Solved

character encoding french text

Posted on 2008-10-24
5
871 Views
Last Modified: 2013-12-09
I have a website with french characters in the content, an asp website.  It currently doesn't have Content-Type metatag set, and is comming back with square blocks in google for characters like e-accent, and also in some browsers.  I would like to know what I should set the Content-Type to (iso-8859-1 or utf8?), and if I should do anything in the asp code also (can I get response.write to output in a particular character-set)
0
Comment
Question by:harrylockhart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:Werrock
ID: 22794405
Is unicode perhaps applicable?
http://en.wikipedia.org/wiki/Unicode_and_HTML
0
 

Author Comment

by:harrylockhart
ID: 22795635
I've read the document, and would like to verify the below before putting anything online
I understand that character-set dependant on the format that is was saved in?
the content is created in InnovaEditor, and is stored in a sqlserver2000 table, the pages are created in asp classic.  Some of the content is also held in html file includes.
What I want to know is
1) if I set the content-type in the meta-tags to utf-8, will this just resolve the issue
2) Do I need to ensure that the page is outputted in a particular character-set?  if so, I need to be able to set the character set used for output generated by response.write, how can I do this?  Would the best output foramt be utf-8?
3) (if relevant) How do I find what format the data is generated in?? or stored in??
0
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22799968
If you don't have UTF-8 in all documents that made the code to begin with, stored it into the database, retrieved it, and displays it, you will encounter loss of higher order ascii codes.  So all steps need to be enabled to use higher-order ascii characters for this to work, including the database.
0
 

Author Comment

by:harrylockhart
ID: 22802637
Reading this link yesterday
http://www.example-code.com/asp/asp-codepages.asp,
I will need to set the session.codepage to 65001 and then response.write will output in utf8 format for the rest of the session.  This will deal with all the db data I think.  I think it won't deal with the include files (am I worng?)
The asp application holds includes as follows, for all pages.
<!-- BEGIN HEADER -->
<!-- #include file="Menu_Header.asp"-->
<!-- END HEADER -->
If I set <% @CodePage = 65001 %> in the header file, will this set the codepage for all include files also?  Do I need to save all these files with speacial encoding?  If so it would be easier to find the current encoding of the files, and set the session.codepage to this.  However, the files are saved without any special encoding set, so I am not sure what encoding they are saved in.  Do you know how I can find this out?
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 500 total points
ID: 22804513
"will this set the codepage for all include files also?"

generally, no.  If they are code fragments yes, but if they are html pages with a head, you should either change the codepage in the head of those, or just make the file a BODY or code fragment.  It depends on how they are included as to whether they need to be a full HTML file with header,or not.  Check them.

"However, the files are saved without any special encoding set, so I am not sure what encoding they are saved in."

If they have a head section, the encoding will default to charset=iso-8859-1 -- so if you want to be certain, change it to UTF-8

0

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

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

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

627 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