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

From: Sam Joseph <gaijin_at_yha.att.ne.jp>
Date: 12/10/02
Message-ID: <[email protected]>
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

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

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


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

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"
<html><head><title></title></head><body bgcolor="#ffffff">

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

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

Received on Tue Dec 10 04:11:36 2002