Webspace & Domain Names This is a discussion on, Japanese text no longer displays within the Freedom2Surf forum; Hi, Just posted this at f2s support but hope I may get a response here sooner: ===================== Looks like all ...

Reply
 
LinkBack Thread Tools
Old 21-10-2007, 12:07 AM   #1
Tiscali User Member
 
freemink's Avatar
 
Join Date: Oct 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Japanese text no longer displays

Hi,

Just posted this at f2s support but hope I may get a response here sooner:
=====================
Looks like all pages being served from my site (since the server migration?) are delivering pages with content-type=ISO-8859-1 regardless of the actual content of the page.

My pages should serve content-type=shift-jis (and some content-type=utf-8), but your servers are ignoring the meta content tags:
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">

Am I missing something here?
=====================

Has anyone else noticed this??

I have checked the http headers and I'm only seeing content-type=iso-8859-1. Whereas if I load the page onto another server I do see content-type=shift-jis.

Maybe I am misunderstanding?

Can anyone explain why my pages that used to display japanese text automatically now require me to set the encoding in the browser manually.

Thanks,
Darrell
freemink is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21-10-2007, 12:12 AM   #2
Tiscali User Member
 
Join Date: Feb 2006
Posts: 388
Thanks: 0
Thanked 0 Times in 0 Posts
I've seen this mentioned before.. you can create a .htaccess file in your folders, and if you add the following line for each of the file extensions you use, it should hopefully work

Quote:
AddCharset shift-jis .html
__________________
ex-f2s - Now on Be Unlimited
Sync: 7779kbps (859KB/s throughput) / 1295kbps (137KB/s throughput)
View my ADSL Statistics - See my gripe with Webfusion
elrandom3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21-10-2007, 12:19 AM   #3
Tiscali User Member
 
freemink's Avatar
 
Join Date: Oct 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the incredibly fast reply.
I had already tried your suggestion and it didn't work.

I have just tried:
Quote:
AddDefaultCharset shift-jis
and that does work!

But still, it's a hack isn't it? What happens if I have some pages that should be shift-jis, some utf-8 and others... I don't though :-) so AddDefaultCharset shift-jis does work.

I'm tying to figure if the http-header should set the content type based on the meta-tag or not?

Anyway, thanks again. I appreciate the response.

Darrell
freemink is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21-10-2007, 12:25 AM   #4
Tiscali User Member
 
Join Date: Feb 2006
Posts: 388
Thanks: 0
Thanked 0 Times in 0 Posts
Generally speaking, most sites tend to just stick with the one charset throughout. Obviously someone at Webfusion (see the sig!) didn't think properly when setting things up.

Meta tags are http-equiv, so they're interpreted by the browser as if they were HTTP headers. I think it's up to them which one they honour.

Might want to have a look at more .htaccess things to see if there's something else that'll override the default somehow.
__________________
ex-f2s - Now on Be Unlimited
Sync: 7779kbps (859KB/s throughput) / 1295kbps (137KB/s throughput)
View my ADSL Statistics - See my gripe with Webfusion
elrandom3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21-10-2007, 01:14 AM   #5
Tiscali User Member
 
freemink's Avatar
 
Join Date: Oct 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Just confirmed, for my own benefit, the following rules of precedence:

http://www.w3.org/International/tuto...enc/#Slide0260
Quote:
Precedence rules

In the case of conflict between multiple encoding declarations, precedence rules apply to determine which declaration wins out. For XHTML and HTML, the precedence is as follows, with 1 being the highest:
1. HTTP Content-Type
2. XML declaration
3. meta charset declaration
4. link charset attribute

...
So, the question is why do the f2s servers assume that my pages will be charset=iso-8559-1 ?

I think that sounds like a mistake?

I guess it would make sense if all my files (at least within any directory) were of the same encoding (preferably utf-8), in which case setting charset in .htaccess would be fine. But if I didn't have access to .htaccess, or if I do have mixed encodings, then what value is there in being careful about setting xml ot meta-tag types if the server is going to get the last say anyway?

Now if the server is supposed to inspect the file and try to determine the charset (from meta-tags for instance) and only set a http-header value if none is found, then that would make more sense. But if that is the case, then it's not happening on these f2s servers.

Also, these pages rendered fine before the migration...

Time for sleep I think.
freemink is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21-10-2007, 10:54 AM   #6
Tiscali User Admin
 
aos101's Avatar
 
Join Date: Jun 2004
Location: Kent
Posts: 3,758
Thanks: 1
Thanked 6 Times in 6 Posts
Quote:
Originally Posted by freemink View Post
I'm tying to figure if the http-header should set the content type based on the meta-tag or not?
I've never heard of that happening, and think it's a bit unlikely. For that to happen, the webserver (Apache, IIS or whatever) would have to understand HTML/XHTML instead of just serve it up.
__________________
Adam
aos101 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21-10-2007, 11:09 AM   #7
Tiscali User Member
 
freemink's Avatar
 
Join Date: Oct 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
THanks for the response,

From the same page:
http://www.w3.org/International/tuto...enc/#Slide0260

Quote:
In-document declarations. For these reasons you should always ensure that encoding information is also declared inside the document.

(Some people would argue that it is rarely appropriate to declare the encoding in the HTTP header if you are going to repeat it in the content of the document. In this case, they are proposing that the HTTP header say nothing about the document encoding. Note that this means specifically disabling any server defaults.)
Maybe this is what I am looking for - a way to disable the server default, and let the page meta tag carry the encoding information.

From reading the W3C page I see pros and cons to both sides, but it's a bit annoying that this server behaviour suddenly changed.
freemink is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 21-10-2007, 05:39 PM   #8
Tiscali User Member
 
freemink's Avatar
 
Join Date: Oct 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
In case this is of interest to anyone else:

Quote:
Maybe this is what I am looking for - a way to disable the server default, and let the page meta tag carry the encoding information.
This can be done by adding the .htaccess directive:

Quote:
AddDefaultCharset off
see:
http://httpd.apache.org/docs/2.0/mod...defaultcharset
freemink is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 22-10-2007, 02:14 PM   #9
Tiscali User Member
 
Robert Wellock's Avatar
 
Join Date: Apr 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
The HTTP 1.1 protocol is considered ASCII ISO-8859-1 by default thus most servers will use that unless they have been explicitly changed.
__________________
};-) http://www.xhtmlcoder.com/
Robert Wellock is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
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 On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
php amend text file problem coptang Webspace & Domain Names 5 25-04-2004 11:21 PM


All times are GMT. The time now is 03:06 AM.