Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > a language encoding issue

Reply
Thread Tools

a language encoding issue

 
 
Beauregard T. Shagnasty
Guest
Posts: n/a
 
      03-31-2009
dorayme wrote:

> You could say quite how you are getting WebDevTool Response Header.
> Not sure I am getting this one? There is stuff in the page that comes
> up with Validate HTML but you talking a different command?


On the Web Developers Toolbar > Information > View Response Headers

--
-bts
-Friends don't let friends drive Windows
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      04-01-2009
In article <gquahg$mjl$(E-Mail Removed)>,
"Beauregard T. Shagnasty" <(E-Mail Removed)> wrote:

> dorayme wrote:
>
> > You could say quite how you are getting WebDevTool Response Header.
> > Not sure I am getting this one? There is stuff in the page that comes
> > up with Validate HTML but you talking a different command?

>
> On the Web Developers Toolbar > Information > View Response Headers


Yes, thanks... on this one I get similar to yours, esp.

Content-Encoding: gzip
Age: 2
Transfer-Encoding: chunked
Connection: keep-alive
Server: YTS/1.17.9

--
dorayme
 
Reply With Quote
 
 
 
 
John Hosking
Guest
Posts: n/a
 
      04-01-2009
Beauregard T. Shagnasty wrote:
> John Hosking wrote:
>
>> Beauregard T. Shagnasty wrote:
>>> Again, placing meta-charset lines doesn't do anything *unless* your
>>> server is sending as charset: none.

>> This is a very interesting statement to me, Beauregard, as I just
>> responded to somebody in another group on this same subject. I acted
>> as if I knew what I was talking about, but your statement makes me
>> suddenly unsure.

>
> Actually, I based my above reply on your post in the other group, 'cause
> I surely thought you knew what you were talkin' about.


You *fool*.

>
> It sounds logical. If the server already sends one (such as the OP's
> sample page) like ISO-8859-1, then no manner of <meta> HTML code will
> change it. Unless - possibly - there isn't one from the server.
>


Yes. My uncertainty seems to come down to the fine difference between
{0} and the empty set, or IOW, between "charset=none" and no charset
statement from the server at all (where ISTM you said "charset: none").
I guess we're in agreement, then. I hope.


--
John
Let's just charter a boat and have fun together on the ship of fools.
 
Reply With Quote
 
JWS
Guest
Posts: n/a
 
      04-01-2009
JD wrote:

> But the text is not shown properly.


The Chinese text is in Big-5 encoding, not Unicode. It is shown OK
in Firefox when I select "view, character encoding, auto-detect,
Chinese".

Perhaps you could try to convert the text to Unicode first. Maybe
the page will then be readable without extra user intervention.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      04-01-2009
Ben C wrote:

> I think the Page Info [in Firefox] may be telling you what encoding the
> browser
> decided to guess.


I'm pretty sure that's what it does.

> This may depend on your locale or something or just
> what mood it's in.


It may be POM-dependent, but more commonly it depends on the browsing
history and on user's actions (if any) with the command View/Encoding. If
you visit a page that does not declare its encoding in HTTP headers or in a
meta tag, e.g. my test page
http://www.cs.tut.fi/~jkorpela/chars/test8.htm
and then experiment with View/Encoding, you'll notice that Page Info changes
accordingly.

So Page Info tells what encoding the browser is using to interpret the page.
This might be something declared in HTTP or in meta, or something else.

(POM = Phase Of the Moon.)

>> Could this be a web browser sensitive matter? Got me?

>
> I tried the page, and the actual header says:
>
> Content-Type: text/html
>
> i.e. no charset.


The actual HTTP header could depend on the browser. This would actually be
quite OK in a situation where a document is available in different encodings
and the server uses the Accept-Charset header sent by the browser to select
the best encoding. In that scenario, the response should of course announce
the negotiated encoding.

> This means the browser would look for a meta tag. But there doesn't
> seem to be one of those either.
>
> There is no specification for what happens next, so you get a
> browser-specific guess.


You get a guess, more or less, but the specification says _something_:

"In addition to this list of priorities, the user agent may use heuristics
and user settings. For example, many user agents use a heuristic to
distinguish the various encodings used for Japanese text. Also, user agents
typically have a user-definable, local default character encoding which they
apply in the absence of other indicators."
http://www.w3.org/TR/REC-html40/charset.html#h-5.2.2

In my Firefox, the setting of default encoding is under
Työkalut/Asetukset/Sisältö/Kirjasinlajit ja värit/Lisäasetukset. I guess
that corresponds to something like Tools/Settings/Content/Fonts and
colors/Additional settings. But this does not make any more sense.

Who the [censored] got the idea of putting _default encoding_ setting under
"Fonts and colors"?!

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading Text File Encoding and converting to Perls internal UTF-8 encoding sln@netherlands.com Perl Misc 2 04-17-2009 11:22 PM
International language encoding conversion newbie Ruby 0 11-14-2008 04:07 PM
sample for base64 encoding in c language aruna.eies.eng@gmail.com C Programming 14 07-09-2007 03:55 AM
changing JVM encoding; setting -Dfile.encoding doesn't work pasmol@plusnet.pl Java 1 10-08-2004 09:50 PM
Encoding.Default and Encoding.UTF8 Hardy Wang ASP .Net 5 06-09-2004 04:04 PM



Advertisments