(keitai-l) Re: Japanese Characters on KDDI phones

From: Sam Joseph <gaijin_at_yha.att.ne.jp>
Date: 12/10/02
Message-ID: <3DF54D05.3030803@yha.att.ne.jp>
Hi Darren,

Thanks for mailing. Got swamped with other problems and have only just
been able to get back to this one.

Darren Cook wrote:

>>I'm having trouble dislpaying Japanese characters on a KDDI phone. I can
>>see Japanese characters fine in both html and hdml pages on the same
>>phone, but Japanese characters in templates delivered by a servlet come
>>up garbled.
>>    
>>
>
>I think we needed to set the encoding type (SJIS) in the apache config;
>meta tags did not work. As you're using a servlet you should be able to
>send an encoding header and not need to touch web server config.
>
Well I've tried setting a few encodings such as:

Content-Type: text/html; charset=Shift_JIS
Content-Type: text/html; charset=SJIS
Content-Type: text/html; charset=MS932
Content-Type: text/html; charset=shift_jis

and they don't seem to have any effect on the characters being displayed
on the phone. They also have the effect of making the Japanese
characters unviewable in my browser as well, which is odd, because in
their absence the browser itself defaults to Shift_JIS to display the
characters.

I have found that I can display Japanese characters on a KDDI phone
using an html page, with no particular encoding settings:

****************************************
SERVER -> CLIENT
****************************************
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 10 Dec 2002 00:40:45 GMT
Content-Type: text/html
Content-Length: 65
ETag: "65-1038973852966"
Last-Modified: Wed, 04 Dec 2002 03:50:52 GMT

<html>
<head>
</head>
<body>
<26085><26412><35486><12486><12473><12488>
</body>
</html>
<--]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

However if I get the same text coming out of my servlet engine (through
turbine)

****************************************
SERVER -> CLIENT
****************************************
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Tue, 10 Dec 2002 01:12:52 GMT
Connection: close
Content-Type: text/html
Content-Language: en-US


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html><head><title></title></head><body bgcolor="#ffffff">
<26085><26412><35486><12486><12473><12488>
</body></html><--]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

I find it gets displayed as gobblidegook on my KDDI phone.

The only difference I notice is that the Turbine/Tomcat setup does not
add a content length header and sets the content language to en-US

I suspect that this content language us the problem. I have worked out
how to switch Turbine so that it sends a Content-Language: ja-JP header
instead, but this seems to lead to the automatic appending of a
Shift_JIS header, and the results still do not show up properly on the
phone.

I will have to try and get the turbine people to reveal to me how to
avoid appending a Content-Language header.

CHEERS> SAM
Received on Tue Dec 10 04:11:36 2002