Re: About charset setting and replacing



gmclee@xxxxxxxx <gmclee@xxxxxxxx> scripsit:

1. UTF-8 isn't a charset, it's an encoding.
Anyway, the following meta is extract from some page (the source HTML
of the searching result of google)

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

The meta tag itself is correct, though it will be (by the specifications and in actual practice) ignored, if the server specifies a charset parameter in actual HTTP headers. You need to find out what the server does, typically by using an HTTP header viewer.

Anyway, UTF-8 is a "charset" in the technical sense that the HTTP header and its <meta> simulation uses the name "charset" for the parameter that specifies the character encoding. The choice of the name "charset" is unfortunate but cannot be changed any more.

What I mean is : insert some UNICODE (e.g. Asian Character) into the
HTML, so if the charset is US-ASCII, it cannot render the text
correctly.

You haven't understood the answers. You cannot change the encoding ("charset") in the midst of a document. Period. Stop trying.

Why cannot you simply use UTF-8 for the entire document? As explained, ASCII characters need not be changed in any way when you put them into an UTF-8 document.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

.



Relevant Pages

  • Re: different encoding handling between old ASP and ASP.Net
    ... globalization support and configuration between ASP and ASP.NET. ... charset to utf-8. ... decode as utf-8 encoding. ... In ASP.NET, we don't need to set these, since ASP.NET bydefault use utf-8 ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Changing the default charset for composing messages
    ... > correct default for the localized version of Entourage you're using. ... > UTF-8 if your message contains characters from more than one character set. ... > will just choose the correct charset on the basis of the characters you've ...
    (microsoft.public.mac.office.entourage)
  • Re: How to convert the charset of texts in a Execl which has multi-language text and charset?
    ... How to convert the charset of texts in a Execl which has multi-language text and charset? ... So I use Iconv to convert the them into UTF-8. ... I managed to convert your Korean text from UTF-8 to EUC-KR, write it to a file and display it correctly in Firefox, once ...
    (comp.lang.ruby)
  • Re: Input Character Set Handling
    ... that compares a UTF-8 string to a string that a user has inputted into ... rather often if they have any clue at all about Unicode). ... Unicode is a *charset*: a set of characters where each character unit ...
    (comp.lang.javascript)
  • Re: Input Character Set Handling
    ... UTF-8" checked: ... The first URL leads to illegal HTTP transmission (no charset ... correction mechanics in browser. ...
    (comp.lang.javascript)