Problems displaying Japanese characters in JSP


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Problems displaying Japanese characters in JSP

  1. #1
    Venkatesh Guest

    Problems displaying Japanese characters in JSP


    Hi all,
    We are working on JSP, JRun 3.0 and mysql. When we type some Japanese
    characters we are able to see them properly, but when we store them into
    the database and redisplay them from the database we are getting junk characters.
    We are using a Javabean for storing and retrieving the data (using normal
    JDBC routines).
    We are also setting the content type in the jsp as follows.
    <% response.setContentType ("text/html; charset=UTF-8"); %>


    Thanks in advance
    venki


  2. #2
    Paul Clapham Guest

    Re: Problems displaying Japanese characters in JSP

    Have you configured mysql to use one of the Japanese character sets such as
    sjis? The documentation that I have for mysql says "If your character set
    includes multi-byte characters, you need to use the multi-byte character
    functions." I don't understand what this means but I haven't yet had to
    deal with this issue.

    You should also find out exactly where the stored characters are turning
    into junk. Are they stored correctly in the database? If so, are they
    correct when they come into the servlet and then mangled on their way to the
    browser?

    PC2

    Venkatesh <venki@tokyoshock.com> wrote in message
    news:39e6ab3a@news.devx.com...
    >
    > Hi all,
    > We are working on JSP, JRun 3.0 and mysql. When we type some

    Japanese
    > characters we are able to see them properly, but when we store them into
    > the database and redisplay them from the database we are getting junk

    characters.
    > We are using a Javabean for storing and retrieving the data (using normal
    > JDBC routines).
    > We are also setting the content type in the jsp as follows.
    > <% response.setContentType ("text/html; charset=UTF-8"); %>
    >
    >
    > Thanks in advance
    > venki
    >




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center