Hello Sun,
I tried out your problem with the japanese Shift-JIS encoding. And it
works for me:
Resin-Pro 3.0.23, Win XP, JDK 1.5

As the servlet mapping:
<servlet-mapping url-pattern="*.php"
servlet-class="com.caucho.quercus.servlet.QuercusServlet">
<init>
<script-encoding>Shift_JIS</script-encoding>
</init>
</servlet-mapping>

And the php file (in Shift-JIS as stated in the script-encoding element):
<?php
header("Content-Type: text/html; charset=Shift_JIS");
echo "世界こんにちは!";
?>

will print out the correct japanese text in Shift-JIS. If I leave out
the header function, the output will be in UTF-8, but nevertheless not
garbled.

If I save my test php file in UTF-8 and set the script-encoding
accordingly also to UTF-8, this also works. Are you 100% sure that your
php file is actually in gb2312 ?

Best regards,
markus


sun baoming wrote:
>
>
> ---------- Forwarded message ----------
> From: *sun baoming* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>
> Date: 2007-3-10 上午11:06
> Subject: Quercus script-encoding don't work with double char encoding
> like CJK
> To: resin-interest@caucho.com <mailto:resin-interest@caucho.com>
>
>
>
> i try the config from Getting Started with Quercus like the following,
> when i use the GB2312 script-encoding, my test.php don't work ,
> display some human unreadable code instead of normal chinese char.
>
> the second, i change the test.php with encoding iso-8859-1, and try
> the script-encoding iso-8859-1, and it works well.
>
>
> system: windows xp (simplified chinese version)
> resin : 3.1.0
> jdk : sun jdk 1.5.0_09
> php script-encoding: gb2312
>
>
> resin-web.xml
> <web-app xmlns="http://caucho.com/ns/resin
>  <http://caucho.com/ns/resin>">
>   <servlet-mapping url-pattern="*.php"
>
>        servlet-class="com.caucho.quercus.servlet.QuercusServlet">
>     <init>
>       <script-encoding>
>
> GB2312</script-encoding>
>     </init>
>   </servlet-mapping>
> </web-app>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest
>   

-- 
----------------------------------------------
Dipl.-Ing. Markus Ken Baron-Moriyama <[EMAIL PROTECTED]>
Director of Global IT Relations and Research
Co-Founder

Wazap AG
Karl-Liebknecht-Str. 5
10178 Berlin
Germany

Tel:  +49 30 278744 2241
Fax:  +49 30 278744 29

URL: http://wazap.com/

Wazap Aktiengesellschaft
HRB 103534 B
Sitz der Gesellschaft: Berlin
Amtsgericht:    Berlin-Charlottenburg
Vorstand:       Andreas Ruehrig (Vors.), Timo Meyer, Alexander Piutti, Philip 
Gienandt
Aufsichtsrat:   Martin Sinner (Vors.), Frank Bo"hnke, Florian Seubert



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to