Results 1 to 3 of 3

Thread: Unicode in JSP

  1. #1
    Join Date
    Nov 2002
    Posts
    4

    Unanswered: Unicode in JSP

    I wanted to take multiple language characters in my jsp file.
    I am storing these characters in Oracle database.
    In my JSP file, I am using following code.
    <META content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>

    But In my oracle database for three japanese characters it is storing data in this form.
    &_#_1_2_3_7_3_;_&_#_1_2_3_8_4_;_&_#_1_2_4_3_1_;
    Please remove _ before reading. If I write above data without _, then it shows japanese characters on dbForums. So I am writing in _.

    Does this data in UNicode format?
    Does my browser need special setting for unicode? I am using IE6.0.
    Instead of above content type, if i use
    <META content="text/html; charset=UTF-8" http-equiv=Content-Type>
    it some times shows different data in the browser, Since i am storing and getting these data from oracle database.

    Can any body help me out?

  2. #2
    Join Date
    Dec 2002
    Posts
    1

    Arrow directions for successful unicode

    Hello there
    I had this problem before and I actually spent like 15 days trying to get arabic characters out of the oracle database and here is what I did...

    1) before anything and at the beginning of your jsp page add an html meta tag for the browser to use UTF-8 in character encoding..

    2) add your jsp <%@page dicrective to use Cp1252 (yes windows english) characterset and by the way this works only with j2se 1.3.1 or higher.

    now the java engine will use english encoding to store the characters but the browser will dispplay them in unicode... by the way your oracle database should be using UTF8 characterset.

    Note: I tried this only with arabic language so I used windows-1256 in my browser settings not UTF-8 so if this doesnt work I am sure your windows japanese characterset settings will work.

    I used oracle 9i jdeveloper, oracle 9i database (UTF8) and tomcat 4.1 for deployment

    best regards

    Sherif

  3. #3
    Join Date
    Feb 2003
    Location
    Vietnam
    Posts
    1

    Unicode in JSP

    Hi all members,

    At the moment I have also a same problem. I am using MySQL database and Jsp. Before inserting data into database with special characters, I called escape function of Javascript to change these characters. But when taking data out of database I do not know how to transfer these characters to the form which we can read.

    I would like to say that we avoid to use unescape function of Javascript.
    Could you please show me the way to change these characters in jsp file?
    Thank you

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •