RE: FRench characters not displayed correctly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 17 April 2008 10:05, Robert Cummings advised:

> On Thu, 2008-04-17 at 10:57 +0200, Angelo Zanetti wrote:
>> 
>> Thanks Robert,
>> 
>> I have the following headers:
>> 
>> 
>> http://fr.xxxx.com/student/themes/english/locker_room/student.html
>> 
>> GET /student/themes/english/locker_room/student.html? HTTP/1.1 Host:
>> fr.xxxx.com User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US;
>> rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14
>> Accept:
>> 
> text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
> ,text/plain;q=
>> 0.8,image/png,*/*;q=0.5
>> Accept-Language: en-us,en;q=0.5
>> Accept-Encoding: gzip,deflate
>> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>> Keep-Alive: 300
>> Connection: keep-alive
>> Referer:
> http://fr.xxxx.com/student/themes/english/locker_room/student.html
>> Cookie: PHPSESSID=818678404c170c8e4f5d237c1d0280a8
>> If-Modified-Since: Sat, 17 Nov 2007 11:40:26 GMT
>> If-None-Match: "6b97e-a9d-619b9e80"
>> Cache-Control: max-age=0
>> 
>> HTTP/1.x 304 Not Modified
>> Date: Thu, 17 Apr 2008 08:31:32 GMT
>> Server: Apache/2.0.55 (Unix) PHP/5.1.2
>> Connection: Keep-Alive
>> Keep-Alive: timeout=15, max=200
>> Etag: "6b97e-a9d-619b9e80"
>> -----------------------------
>> 
>> 
>> Now I see that the headers have:
>> 
>> Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
>> 
>> Which to me seems like it is sending both ISO-8859-1 and UTF-8?
> 
> No, that's what kind of content the server is willing to accept from
> various sources such as POST.

Er, no, that's what kind of content the browser is prepared to accept
back from the server -- the headers starting from the GET line are what
the browser sends to the server as part of the request.  The lines
starting at the HTTP/1.x line are what the server returns.

In this case, you're getting a 304 Not Modified, which means the server
is not even serving any content on this request, nor, probably, even a
full set of headers -- it's just telling the browser it can use its
cached page.  To be absolutely sure what the relevant headers are, you
need to force the server to send the full page -- usually, the best way
to do this is to hold down the Ctrl key whilst clicking the
Refresh/Reload button.

Incidentally, I notice that what's being served here is a .html page,
and the presence of a 304 response, and no PHP headers, suggests it
actually is plain HTML, and not a disguised script, so this whole thread
is really very OT...!! ;)  However, this being the case, it suggests you
have a static .html file on your site claiming to be charset=utf-8, but
not saved in UTF-8!  There are two obvious ways to solve this: (i)
convert the file into UTF-8, or (ii) edit it to have the correct
charset= value in the tag.

Cheers!

 --
Mike Ford,  Electronic Information Services Adviser,
JG125, The Headingley Library,
James Graham Building, Leeds Metropolitan University,
Headingley Campus, LEEDS,  LS6 3QS,  United Kingdom
Email: m.ford@xxxxxxxxxxxxxx
Tel: +44 113 812 4730          Fax:  +44 113 812 3211


To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux