Thank you Markus, It is not matter of the file encoding because the
problem also happened with my database results (using mysql 5). If I
run mysql from console it display correctly the Japanese text, but
when displaying it on the browser not.

So, I tried other way around. I installed Tomcat, php-cgi and java-php
bridge and now all my applications are running without any problem and
without having to configure any file.

I'll continue testing caucho and quercus on other port because I think
it can be useful on the future. So any configuration tip it would be
welcome.

Thank you!

On 3/12/07, Markus Ken Baron-Moriyama <[EMAIL PROTECTED]> wrote:
> Hi,
> I tried out this configuration:
>   <servlet-mapping url-pattern="*.php"
>        servlet-class="com.caucho.quercus.servlet.QuercusServlet">
>     <init>
>       <script-encoding>UTF-8</script-encoding>
>     </init>
>   </servlet-mapping>
>
> and the php:
> <?php
>        $charset = "UTF-8";
>        header("Content-Type: text/html; charset=".$charset);
>        echo "<html><body>";
>        $var = utf8_encode("バリューパック"); //Japanese text
>        echo utf8_decode($var);
>        echo "</body></html>";
> ?>
>
> and it works for me with the correct Japanese output.
> I am using Resin 3.0.23 with JDK 1.5 on Win XP. Are you sure that your
> utf8Test.php is really in UTF-8? As default, I think japanese files are
> created with EUC-JP on linux, so maybe you will have to convert the file
> first.
>
> Best regards,
> markus
>
>
> MexIQ MexIQ wrote:
> > Maybe I'm doing something else wrong... I added at the default 
> > resin-web.xml:
> >
> >   <servlet-mapping url-pattern="*.php" servlet-name="resin-php">
> >         <init><script-encoding>ISO-8859-1</script-encoding></init>
> >   </servlet-mapping>
> >
> > And I had the same results.
> >
> > My directory structure is:
> >
> > /WEB-INF/web.xml
> > /utf8Test.php
> >
> > I need something else?
> >
> > I'm sorry to ask, but I have been looking on the wiki and the web and
> > I don't find what I need. Do you know what part of the documentation I
> > have to read?
> >
> > thank you.
> >
> > On 3/11/07, MexIQ MexIQ <[EMAIL PROTECTED]> wrote:
> >
> >> Thank you Sun,
> >>
> >> I have in my WEB-INF/web.xml
> >> <script-encoding>ISO-8859-1</script-encoding>
> >>
> >> I will try to add it to resin-web.xml and see what happen...
> >>
> >> I will reply...
> >>
> >> On 3/11/07, sun baoming <[EMAIL PROTECTED]> wrote:
> >>
> >>> official document says in your web.xml or resin-web.xml :
> >>>
> >>>
> >>> <web-app xmlns="
> >>> http://caucho.com/ns/resin";>
> >>>  <servlet-mapping url-pattern="*.php"
> >>>
> >>>  servlet-class="com.caucho.quercus.servlet.QuercusServlet">
> >>>  <init>
> >>>  <script-encoding>
> >>>
> >>> ISO-8859-1</script-encoding>
> >>>  </init>
> >>>
> >>>  </servlet-mapping>
> >>> </web-app>
> >>> give it a try.
> >>>
> >>> when i used  this with chinese encoding ,maybe the same as your problem, 
> >>> in
> >>> my experience it never worked .
> >>>
> >>> 2007/3/10, MexIQ MexIQ < [EMAIL PROTECTED] >:
> >>>
> >>>> (Sorry to send it again, but I used other email account and I was not
> >>>> sure if it was received).
> >>>>
> >>>> Hello everyone, I was always expecting to have JAVA and PHP together
> >>>> (I develop in both languages and I wanted a simple and fast way to run
> >>>> my applications in just one server and one port and taking advantage
> >>>> of my java codes). I wanted to give caucho a look and I tried to run a
> >>>> small system buy I'm having some problems trying to get some special
> >>>> characters to display.
> >>>>
> >>>> I made this test:
> >>>>
> >>>> <?php
> >>>>        $charset = "UTF-8";
> >>>>        header("Content-Type: text/html; charset=".$charset);
> >>>>        echo "<html><body>";
> >>>>        $var = utf8_encode("バリューパック"); //Japanese text
> >>>>        echo utf8_decode($var);
> >>>>        echo "</body></html>";
> >>>> ?>
> >>>>
> >>>> I think it have to display it as the original text. But it just
> >>>> display the UTF-8 charset on the screen:
> >>>>
> >>>> バリューãƒ'ック
> >>>>
> >>>> If I comment the line: header("Content-Type: text/html;
> >>>>
> >>> charset=".$charset);
> >>>
> >>>> and manually I select "UTF-8" encoding, the correct (original) text is
> >>>> displayed.
> >>>>
> >>>> I'm using firefox in linux, but I tested also with I.E. and firefox
> >>>> (windows) from other computer.
> >>>>
> >>>> Maybe I have something wrong in my configuration.
> >>>> It is not just Japanese, I also tested with latin characters and was
> >>>> the same thing.
> >>>>
> >>>> By the way, do you know if Quercus will add the Multi-byte functions?
> >>>>
> >>>> And... sure! I would like to help Quercus to grow...
> >>>> _______________________________________________
> >>>> resin-interest mailing list
> >>>> resin-interest@caucho.com
> >>>>
> >>>>
> >>> http://maillist.caucho.com/mailman/listinfo/resin-interest
> >>>
> >>> _______________________________________________
> >>> resin-interest mailing list
> >>> resin-interest@caucho.com
> >>> http://maillist.caucho.com/mailman/listinfo/resin-interest
> >>>
> >>>
> >>>
> > _______________________________________________
> > 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
>
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to