You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Årun.Ñ" <ar...@eximsoft.com> on 2001/12/29 14:58:22 UTC
encoding Shift_JIS for i-mode phones
Hi all,
I have a serious problem and i have been asking this users list many times but i didnot get any solution, so i thought may be some one from developer list will help me out solving this .
i have a simple xml page which has shift_jis encoding. the source of the file is here below.
Everthing works fine and the problem is there are some numbers in the source page of the output html to represent the japnese characters.
I am using cocoon 1.8.2, I have tried most of the options suggested by others and some i know but it is not working.
If i view the page in a web browser like IE or Netscape everthing works fine. the output is below
ログイン hello
ユーザーID
パスワード
簡単ログインページを作成する
メインメニューへ
where as the content in the xml page is <heading> ƒƒOƒCƒ“@ <font color="#FF9900">hello</font></heading>
but the out put html page source is
<body>
<center><h3> ログイン  <font color="#FF9900">hello</font></h3></center>
<center>
メインメニューへ
</center>
</body>
IE and Netscape resolves these numers and displays the japnese characters very well. but in case of i-mode phone it is happening. I have attached the screen shot in i-mode phone.
if the output from the XSLT processor is same what i have in xml " ƒƒOƒCƒ“@ " then everthing works fine. How to restrict XSLT processor so that it does not generate that nubers instead keeps the content same. ??
I donot want those numbers.... can anyone please help me ?????
Using cocoon 2 solves that problem. I want a solution with cocoon1.8.2
regards,
Arun.N
<?xml version="1.0" encoding="Shift_JIS"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="jsps/user/xsl/to-html.xsl" type="text/xsl" ?>
<?xml-stylesheet href="jsps/user/xsl/to-wml.xsl" type="text/xsl" media="wap"?>
<?xml-stylesheet href="jsps/user/xsl/to-hdml-login.xsl" type="text/xsl" media="lynx"?>
<xsp:page language="java"
encoding="Shift_JIS"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:request="http://www.apache.org/1999/XSP/Request"
xmlns:session="http://www.apache.org/1999/XSP/Session"
create-session="true"
>
<xsp:structure>
<xsp:include>com.melpo.util.*</xsp:include>
</xsp:structure>
<page>
<xsp:logic>
Log.write("Enter page login.xml",1);
</xsp:logic>
<title>Melpo</title>
<xsp:logic>
session.setAttribute("link","/login.xml");
</xsp:logic>
<body>
<heading> ƒƒOƒCƒ“@ <font color="#FF9900">hello</font></heading>
<center>
<form>
<xsp:attribute name="action"><xsp:expr>response.encodeURL("/m")</xsp:expr></xsp:attribute>
<xsp:attribute name="method">post</xsp:attribute>
<label>ƒ†[ƒU[ID</label><sp/>
<input>
<xsp:attribute name="type">text</xsp:attribute>
<xsp:attribute name="name">user</xsp:attribute>
<xsp:attribute name="maxlength">255</xsp:attribute>
</input>
<br/>
<label>ƒpƒXƒ[ƒh</label><sp/>
<input>
<xsp:attribute name="type">password</xsp:attribute>
<xsp:attribute name="name">pass</xsp:attribute>
<xsp:attribute name="maxlength">12</xsp:attribute>
</input>
<hidden>
<xsp:attribute name="type">hidden</xsp:attribute>
<xsp:attribute name="name">q</xsp:attribute>
<xsp:attribute name="value">login</xsp:attribute>
</hidden>
<br/>
<checkbox>
<xsp:attribute name="type">checkbox</xsp:attribute>
<xsp:attribute name="name">toEasyLogin</xsp:attribute>
<xsp:attribute name="value">true</xsp:attribute>
</checkbox>
<label>ŠÈ’PƒƒOƒCƒ“ƒy[ƒW‚ð쬂·‚é</label>
<br/><br/>
<xsp:logic>
String message = (String) request.getAttribute("message");
<![CDATA[if(message!=null && !message.equals(""))]]>
{
<label><xsp:expr>message</xsp:expr></label><br/><br/>
}
</xsp:logic>
<do>
<xsp:attribute name="type">submit</xsp:attribute>
<xsp:attribute name="waptype">accept</xsp:attribute>
<xsp:attribute name="name">Login</xsp:attribute>
<xsp:attribute name="value">ƒƒOƒCƒ“</xsp:attribute>
</do>
<reset>
<xsp:attribute name="type">reset</xsp:attribute>
<xsp:attribute name="name">Cancel</xsp:attribute>
<xsp:attribute name="value">ƒLƒƒƒ“ƒZƒ‹</xsp:attribute>
</reset>
</form>
<a>
<xsp:attribute name="href"><xsp:expr>response.encodeURL("/jsps/user/mainmenu.xml")</xsp:expr></xsp:attribute>
ƒƒCƒ“ƒƒjƒ…[‚Ö
</a>
<br/><br/>
<hr/>
<label>ŠÈ’PƒƒOƒCƒ“‚Æ‚ÍAAƒ†[ƒU[ID‚âƒpƒXƒ[ƒh‚𖈉ñ“ü—Í‚µ‚È‚‚Ä‚àmelpo‚ɃƒOƒCƒ“‚ª‚Å‚«‚é‹@”\‚Ì‚±‚Æ‚Å‚·B </label>
</center>
</body>
<xsp:logic>
Log.write("Exited page login.xml",1);
</xsp:logic>
</page>
</xsp:page>