charset confusion

R

royend

Hi.
I am having some trouble with the meta-tag charset:
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">

This is the situation:
I have two pages that uses the same include-file to set the common
html-page. They both import variables from a database to a form. One
of them needs to have the charset set to "iso-8859-1" in order to work
with international charachters (Norwegian), while the other page needs
the charset set to "utf-8" to output international characters.

Does anybody know why?

I need to use only one of the charsets as this actually conflicts with
hundreds (at least tens) of pages which uses the same include-file...

Looking forward to any help.
royend :)
 
P

Philip

Hi.
I am having some trouble with the meta-tag charset:
<meta http-equiv="content-type" content="text/html;
charset=iso-8859-1">

This is the situation:
I have two pages that uses the same include-file to set the common
html-page. They both import variables from a database to a form. One
of them needs to have the charset set to "iso-8859-1" in order to work
with international charachters (Norwegian), while the other page needs
the charset set to "utf-8" to output international characters.

Does anybody know why?

I need to use only one of the charsets as this actually conflicts with
hundreds (at least tens) of pages which uses the same include-file...

Hi royend,
A sample URL or two would be most helpful.
 
R

royend

Hi.

The pages are behind password protected area, and therefore I cannot
give you any link.
I guess the confusion is a result of me including an extra asp-file
which includes an iFrame with a texteditor in one of the pages. Since
then it has only accepted utf-8 as its charset in order to use
international characters.

The iFrame used utf-8, while I earlier used iso-8859-1 in my
html_include.asp. I have changed this iFrame to use iso-8859-1, but it
still ends up wrong when I use iso-8859-1 in my html_include.asp.

Hopefully this didn't get confusing.
Also, this link describes that many has the same problem:
http://sourceforge.net/forum/forum.php?thread_id=1521259&forum_id=257180
(I am actually using this text-editor)
But their solution can't be used on my system, as it would mean turning
every page around...

royend

Philip skrev:
 
P

Philip

Philip skrev:

The pages are behind password protected area, and therefore I cannot
give you any link.
I guess the confusion is a result of me including an extra asp-file
which includes an iFrame with a texteditor in one of the pages. Since
then it has only accepted utf-8 as its charset in order to use
international characters.

The iFrame used utf-8, while I earlier used iso-8859-1 in my
html_include.asp. I have changed this iFrame to use iso-8859-1, but it
still ends up wrong when I use iso-8859-1 in my html_include.asp.

Hopefully this didn't get confusing.
Also, this link describes that many has the same problem:
http://sourceforge.net/forum/forum.php?thread_id=1521259&forum_id=257180
(I am actually using this text-editor)
But their solution can't be used on my system, as it would mean turning
every page around...

Hej,
Since you can't give me an example, I'll have to speculate on what's
going wrong here. My guess is that you've got a mix of encodings here,
and that's what's causing your problem. As general advice, I'd say
commit to using UTF-8 which is more flexible than ISO-8859-1. If you're
willing to stick to Norwegian (or most Western European) only,
ISO-8859-1 will do.

Whatever encoding you decide to use, make sure that your text editor is
saving files in that encoding. Next, make sure that the code that's
pulling stuff out of the database writes its HTML in your chosen
encoding. And make sure your database uses and encoding that doesn't
mangle the non-ASCII characters that you put into it. Last but not
least, make sure that your Web pages' encoding is specified in only one
place. It is a common mistake on Web pages to send one encoding in the
HTTP header and then specify another in the HTML which can cause
mysterious problems. My web site (in my sig) can identify that problem
for you if you have a public URL.

If this (admittedly vague) advice doesn't resolve your problem, you'll
have to come back with a public example or a more specific explanation
of what's going wrong. For instance, "it has only accepted utf-8 as its
charset in order to use international characters" doesn't tell me what
problem you're having. Something like "When I use international
character "X", it displays like this on my screen (URL to screenshot)"
is more helpful.

Lycka till
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,067
Latest member
HunterTere

Latest Threads

Top