Problem in displaying Japanese characters on the browser.

Hi Friends,
Hope one of you could help me in this!!
We are using SHIFT_JIS character encoding in our jsps to display Japanese characters.
<%@ page contentType="text/html; charset=SHIFT_JIS" %>
Is there any other configuration required on server side to let the Japanese characters being displayed? Because what I am getting on screen is quite annoying. Well something like below.
?V?M???????�
Even though my knowledge in Japs isn't too good :-)) I can understand that these are not Japanese. I believe I am missing something in terms of server side configuration, Can anybody point that out. (Maybe some of the Japanese developers in here).
This could not be a client side issue, since from the same machine I can access other Japanese sites and they display properly. Let me know if anybody can help.
I am running these in WAS 5.0
Thanks,
King

Your text in the JSP should be UTF-8 nevertheless - as would be ideal
for internationalization. Java comes with a command-line conversion tool
native2ascii which is bidirectional.
As non-Japanese I am not certain whether "SJIS" might not be better (there
are some name variations in java).
The HTML generation will translate these characters to SHIFT_JIS in your case.
Where the target encoding cannot handle the intended character it receives a
question mark - hat you saw.
Furthermore you need a proper font in HTML and under Windows (window title).
Your webserver should have east-asian support. Though Japanese (and English)
are standard, I, as non-japanese am not certain about SHIFT_JIS.
Also there is some freedom in choice for a japanese encoding.

Similar Messages

  • Having a problem in displaying Japanese characters in JSP

    Hi, Could someone pls help me out with this...
    I'm trying to implement my application(in Java) in English, French and Japanese languages. For this purpose, I have used ResourceBundle class. I have no problem in implementing English and French versions as they are all in Unicode.
    For Japanese version, I have used a tool called NJStar Editor to create a properties file in Japanese and am saving the file with format:"Shift-JIS Text File".
    Then I run native2Ascii <fileCreated><asciiConvertedFile>.
    I see that the asciiConvertedFile has converted text such as "wfm_wla_filter=\u30d5\u30a3\u30eb\u30bf\u30fc".
    I'm calling this variable from a JSP using <%=bundle.getString("wfm_wla_filter")%>. In the JSP i include <%@ page contentType="text/html; charset=Shift_JIS" %> to take care of the Japanese content.
    The final result that is displayed in the browser is not Japanese. It is either some garbage that is not understandable or it is just "??????".
    Could you pls tell me where I might have gone wrong in the any of the procedures that I have mentioned above.
    Thanks in advance
    Satish

    Hi,
    I think you need to look at this as a two-step problem.
    First, you need to get the external characters from a file into the JVM. The java.util.Properties object doesn't know how to handle Shift-JIS, UTF-8, etc. According to the JavaDoc, Properties.load only understands ISO 8859-1. So, the native2ascii tool converts your Shift_JIS files into something that Properties can load. During the Properties.load process, the bytes from the properties file get converted into 2-byte Unicode characters, the only format the JVM deals with.
    Second, you need send Shift-JIS bytes back to your browser. So, you need to convert Java Strings into a Shift-JIS encoded byte stream. Here's an example of how to send Shift-JIS bytes to the browser using basic Java objects:
    <%@ page contentType="text/html; charset=Shift-JIS" %>
    <%
    ResourceBundle rb =
    ResourceBundle.getBundle("MyResources", Locale.JAPAN);
    String someMessage = rb.getString("someMessageKey");
    writer.print(someMessage);
    %>
    Note that since you declared the charset as Shift-JIS, the JSP writer should send the bytes in someMessage in the response stream as Shift_JIS encoded. Under the covers, the JSP container should interpret your contentType declaration and embed a new OutputStreamWriter(out, "Shift-JIS") into the JSP Writer. In the old days with Servlets, we had to work with OutputStreams directly using OutputStreamWriter. (Note: might be SJIS vs. Shift-JIS depending on your JDK).
    Lastly, I strongly recommend that you use the JSTL i18n (prefix fmt) tags for developing i18n/l10n support into your Web application vs. re-inventing the wheel.
    Best regards,
    Timothy Potter

  • Problem in displaying Japanese characters in SAPScripts

    Hi All,
    I am facing a strange problem in one of my SAPScripts. I have one script in both English and Japanese languages. The scripts are already existing. I had to do some minor changes in a logo window. I did them and i did not do any other changes in any of the windows.
    When the output wa s seen for the script in the Japanese version, it was looking ok displaying all hte Japanese characters in various windows. Now, during testing , in the same server, the Japanese characteres are not shown. Instead , some ' #'(hash) symb ols are getting displayed.
    How could it happen? Did any body face such problem? If so, can anybody plz help me out with the solution?
    What shud i do to get back the Japanese characters in my script again?
    Regards,
    Priya

    Priya.
    this is not an ABAP problem ask your BASIS team to set printer cofing from SPAD.dont worry its not an ABAP issue at all.
    sometime printer doesnt support special char so it need to be setting with printer.
    Amit.

  • Correct display of characters in the Browser - Pls Help - Urgent

    Hi,
    We have a java application running on solaris 8 connected to oracle 8.1.6 database. The database characterset has been changed to WE8ISO8859P15 to support Western European Characters and the Euro symbol.
    The problem we are facing is, when the euro symbol (Alt + 0128) is entered thru the HTML form and then retrieved from the database and again displayed on the HTML form, it shows as inverted question mark or some other character.
    If any one can tell us exactly the steps to follow overcome this problem, it would be of great help. What settings have to be changed in the webserver, database and the client side so that there is proper data conversion.
    Immediate response is apprecited.
    Thanks

    Couple of samples to try:
    1)
    <%@ page contentType="text/html;charset=ISO-8859-15" %>
    <HTML>
    <HEAD>
    <TITLE>Hello</TITLE></HEAD>
    <BODY>
    <%
    String charset = response.getCharacterEncoding();
    %>
    <BR> encoding = <%= charset %> <BR>
    <%
    String nameValue = request.getParameter("euro");
    String euroVal = "\u20ac";
    if (nameValue == null || nameValue.length() == 0) { %>
    <FORM METHOD="GET">
    Please input your name: <INPUT TYPE="TEXT" NAME="euro" value="<%=euroVal%>" size=20> <BR>
    <INPUT TYPE="SUBMIT">
    </FORM>
    <% }
    else
    nameValue= new String(nameValue.getBytes("ISO8859_1"), charset); %>
    <H1> Hello, <%= nameValue %> </H1>
    <%
    //insert nameValue into database
    %>
    </BODY>
    </HTML>
    2)
    <%@ page contentType="text/html;charset=ISO-8859-15" %>
    <HTML>
    <HEAD>
    <TITLE>Hello</TITLE></HEAD>
    <BODY>
    <%
    String charset = response.getCharacterEncoding();
    request.setCharacterEncoding(charset);
    %>
    <BR> encoding = <%= charset %> <BR>
    <%
    String nameValue = request.getParameter("euro");
    String euroVal = "\u20ac";
    if (nameValue == null || nameValue.length() == 0) { %>
    <FORM METHOD="GET">
    Please input your name: <INPUT TYPE="TEXT" NAME="euro" value="<%=euroVal%>" size=20> <BR>
    <INPUT TYPE="SUBMIT">
    </FORM>
    <% }
    else
    %>
    <H1> Hello, <%= nameValue %> </H1>
    <%
    //insert nameValue into database
    %>
    </BODY>
    </HTML>We have tired your code and here are the answers to your questions:
    1. Does the euro example work in your environment?No it is not working.we could not run the second example because'
    we don't have a "request.setCharacterEncoding(charset)" method.
    we are using servlet 2.2 api
    2. Is the HTML form a JSP/Servlet or a HTML calling CGI?we are having HTML/JSP form calling a servlet.
    the results and forms are always JSP.
    3. Try using a HTTP GET in the form and observe the URL on
    the browser. Does it show the parameter as:
    http://host:port/euro01.jsp?euro=%A4
    Euro symbol's code point is A4 in ISO-8859-15. We'd like to make
    sure it is not corrupted when it is sent to the server.your previous example shows it as %A4 but it is not inserting correctly
    in the database.The ascii value of the inserted value is 191 but we guess the correct
    ascii value is 164.
    4. After insertion, check the value on the database server.
    Assume you insert the data in the following table:
    create table tab01 (col01 varchar2(100));
    You can query the euro code point:
    select dump(col01, 16) from tab01;
    Check to see if the value shows A4.the result we have is Typ=1 Len=1: bf
    5. Please be aware that the example above is for varchar/char
    column. You mentioned uploading blob content into database. Is
    it a separate issue? Or do you just request a blob example?Actually blobs are not a problem. What we actually meant is that we are uploading some blob content into the database for which we have to use com.oreilly.servlet.MultipartRequest. But inserting euro symbol becomes a problem when we use this. If we use without multipart request we are able to insert euro but will not be able to upload blob. Blob content is not related to euro.
    6. If problem still persists, I suggest that you send us a simple
    program of yours that include the HTML/JSP and your schema
    (SQL). Here is the program we are using to test.
    <html>
    <HEAD>
    <title>Charset Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">
    </head>
    <body>
    <form name='f' action="CharsetTestJSP.jsp" method=post enctype="multipart/form-data">
    <input type=text name="TestValueMpr">
    <input type=submit value="Submit for MultipartRequest">
    </form>
    <form name='forn' action="CharsetTestReqJSP.jsp" method=post >
    <input type=text name="TestValueReq">
    <input type=submit value="Submit for OrdinaryRequest">
    </form>
    </body>
    </html>
    this is the html file with two forms , one with multipart request and the other without it. When used the form without multipart request, inserting euro into the db, stores it correctly and displays it correctly when retrieved. The html form calls 2 jsp files which are as follows:
    CharsetTestReqJSP.jsp
    <%@ page contentType="text/html; charset=ISO-8859-15" %>
    <%@ page import="com.interactive1.kf.Config,java.sql.*"%>
    <%
              //response.setContentType("text/html");
    //response.setHeader("Content-Type", "text/html; charset=ISO-8859-15");
    //java.io.PrintWriter out = response.getWriter();
    String test = "test";
    String testFromForm = request.getParameter("TestValueReq");
    * Here instaed of the test value we are
    * inserting what is coming from the form
    Connection con = null;
    try {
    con = Config.getInstance().getConnection();
    StringBuffer sql = new StringBuffer("INSERT INTO x_temp VALUES (?)");
    PreparedStatement pstmt = con.prepareStatement(sql.toString());
    pstmt.setString(1,testFromForm);
    pstmt.executeUpdate();
    pstmt.close();
    pstmt = con.prepareStatement("SELECT * FROM x_temp");
    ResultSet rst = pstmt.executeQuery();
    while(rst.next()) {
    out.println(rst.getString("text"));
    rst.close();
    pstmt.close();
    } catch (SQLException se) {
    out.println("problem sql exception : " + se.getMessage());
    } finally {
    if (con!=null) {
    try {
    con.close();
    } catch (SQLException se) {
    se.printStackTrace();
    out.println(response.getCharacterEncoding());
    out.println("");
    System.out.println("");
    %>
    CharsetTestJSP.jsp
    <%@ page contentType="text/html; charset=ISO-8859-15" %>
    <%@ page import="com.interactive1.kf.Config,java.sql.*,com.oreilly.servlet.MultipartRequest"%>
    <%
    System.out.println("request="+request.getParameter("TestValueMpr"));
    MultipartRequest mpr = new MultipartRequest(request,5*1024*1024);
    System.out.println("mpr="+mpr);
              //response.setContentType("text/html");
    //response.setHeader("Content-Type", "text/html; charset=ISO-8859-15");
    //java.io.PrintWriter out = response.getWriter();
    String test = "test";
    String testFromForm = mpr.getParameter("TestValueMpr");
    * Here instaed of the test value we are
    * inserting what is coming from the form
    Connection con = null;
    try {
    con = Config.getInstance().getConnection();
    StringBuffer sql = new StringBuffer("INSERT INTO x_temp VALUES (?)");
    PreparedStatement pstmt = con.prepareStatement(sql.toString());
    pstmt.setString(1,testFromForm);
    pstmt.executeUpdate();
    pstmt.close();
    pstmt = con.prepareStatement("SELECT * FROM x_temp");
    ResultSet rst = pstmt.executeQuery();
    while(rst.next()) {
    out.println(rst.getString("text"));
    rst.close();
    pstmt.close();
    } catch (SQLException se) {
    out.println("problem sql exception : " + se.getMessage());
    } finally {
    if (con!=null) {
    try {
    con.close();
    } catch (SQLException se) {
    se.printStackTrace();
    out.println(response.getCharacterEncoding());
    out.println("");
    System.out.println("");
    %>
    I hope this will help you to suggest a remedy for our problem.
    Thanks

  • Hello! I am writing to inform you that about that you have a problem displaying your website in the browser.

    Hello! I am writing to inform you that about that you have a problem displaying your website in the browser.
    In Yandex browser. I decided to tell you, because the site is not displayed correctly. As in the screenshot.

    apart from the fact there's no way I could have answered your question confidently, I was also not able to supply my non-answer within your very tight time constraints.
    what happened? how'd you get on?

  • [Solved] URXVT cannot display Japanese Characters

    Solved:
    I had a typo in my locale.conf, setting to an invalid locale - apparently that did it.
    Thanks for the help!
    Hi everybody!
    I just now re-installed Arch because I switched hard-drives (to an SSD) and everything seems to be working again, apart from one thing:
    urxvt doesn't display Japanese Characters, just questionmarks instead when using ls and garbage characters otherwise.
    I literally copied and pasted my ~/.Xresources from my old install, so I'm not quite sure what went wrong.
    This is said file:
    Urxvt.urgentOnBell: True
    urxvt*cursorBlink: false
    !urxvt*internalBorder: 0
    !urxvt*externalBorder: 0
    URxvt*.depth: 32
    URxvt*.background: [85]#000000
    ! URxvt.scrollstyle: plain
    URxvt.scrollBar: false
    URxvt.foreground: grey
    ! red
    URxvt.color1: #CC0000
    URxvt.color9: #B33838
    ! blue
    URxvt.color4: #3465A4
    URxvt.color12: #729FCF
    ! yellow
    Urxvt.color3: #b48363
    URxvt.color11: #d49b4e
    !URxvt.font: 8x13
    urxvt*font: xft:DejaVu Sans Mono:size=8:antialas=true,xft:Kochi Gothic:size=8
    This is what fc-list has to say:
    % fc-list | grep "Kochi\|DejaVuSansMono"
    /usr/share/fonts/TTF/DejaVuSansMono.ttf: DejaVu Sans Mono:style=Book
    /usr/share/fonts/TTF/kochi-mincho-subst.ttf: Kochi Mincho,æ±é¢¨ææ:style=Regular,æ¨æº
    /usr/share/fonts/TTF/kochi-gothic-subst.ttf: Kochi Gothic,æ±é¢¨ã´ã·ãã¯:style=Regular,æ¨æº
    /usr/share/fonts/TTF/DejaVuSansMono-Oblique.ttf: DejaVu Sans Mono:style=Oblique
    /usr/share/fonts/TTF/DejaVuSansMono-Bold.ttf: DejaVu Sans Mono:style=Bold
    /usr/share/fonts/TTF/DejaVuSansMono-BoldOblique.ttf: DejaVu Sans Mono:style=Bold Oblique
    I already tried re-installing the fonts and I also tried out alternative fonts, but nothing seems to work.
    All the other settings from the ~/.Xresources file are applied perfectly, so I'm not quite sure where to look for the error.
    My browser (dwb) displays japanese characters just fine.
    Any help is greatly appreciated
    Edit: I just realized that urxvt seems to completely ignore the fonts line - I had that problem once before, when I used the AMD Catalyst driver and not the open source one.
    I now have an Nvidia card and started using the propietary driver - maybe that has something to do with it?
    Last edited by lorizean (2013-12-02 13:16:14)

    Works here:
    URxvt*depth: 32
    URxvt*buffered: true
    URxvt*termName: rxvt-256color
    URxvt.font: xft:Terminus:pixelsize=12:antialias=false
    urxvt.imLocale: pl_PL.ISO8859-2
    What's the output of 'localectl'?

  • [Bug Report] CR4E V2: Exported PDF displays Japanese characters incorrectly

    We now plan to transport a legacy application from VB to Java with Crystal Reports for Eclipse. It is required to export report as PDF file, but result PDFs display Japanese characters incorrectly for field with some mostly used Japanese fonts (MS Gothic & Mincho).
    Here is our sample Crystal Reports project:   [download related resources here|http://sites.google.com/site/cr4eexportpdf/example-of-cr4e-export-pdf]
    1. PDFExportSample.rpt located under ..\src contains fields with different Japanese fonts.
    2. Run SampleViewerFrameClient#main(..) to open a Java Report Viewer:
        a) At zoom rate 100%, everything is ok.
        b) Change zoom rate to 200% or 50%, some fields in Japanese font collapse.
        c) Export to PDF file,
             * Fonts "MS Gothic & Mincho": both ASCII & Japanese characters failed.
             * Fonts "Meiryo & HGKyokashotai": everything works well.
             * Open PDF properties, you will see all fonts are embedded with built-in encoding.
             * Interest to note that copy collapsed Japanese characters from Acrobat Reader, then
               paste them into a Notepad window, Notepad will show the correct Japanese characters anyway.
               It seems PDF export in CR4E mistaking to choose right typeface for Japanese characters
               from some TTF file.
    3. Open PDFExportSample.rpt in Crystal Report 2008 Designer (trial version), and export it as PDF.
        The result PDF displays both ASCII & Japanese characters without any problem.
    Test environment as below:
    * Windows XP Professional SP3 (Japanese) with MS Office which including extra fonts (i.e. HGKyokashotai)
    * Font version: MS Gothic, Mincho, Meiryo, all in Version 5.0
        You can download MS Meiryo from Microsoft's Site:
        http://www.microsoft.com/downloads/details.aspx?familyid=F7D758D2-46FF-4C55-92F2-69AE834AC928&displaylang=en)
    * Eclipse 3.5.2
    * Crystal Reports for Eclipse, V2, 12.2.207.r916
    Can this problem be fixed? If yes how long will it take to release a patch?
    We really looking forward to a solution before abandoning CR4E.
    Thanks for any reply.

    I have created a [simple PDF file|http://sites.google.com/site/cr4eexportpdf/inside-the-pdf/simple.pdf?attredirects=0&d=1] exported from CR4E. It is expected to display "漢字" (or in unicode as "\u6F22\u5B57"), but instead being rendered in different ones of "殱塸" (in unicode as "\u6BB1\u5878").
    Look inside into this simple PDF file (you can just open it with your favorite text editor), here is its page content:
    8 0 obj
    <</Filter [ /FlateDecode ] /Length 120>>
    stream ... endstream
    endobj
    Decode this stream, we get:
    /DeviceRGB cs
    /DeviceRGB CS
    q
    1 0 0 1 0 841.7 cm
    13 -13 569.2 -815.7  re W n
    BT
    1 0 0 1 25.75 -105.6 Tm     <-- text position
    0 Tr
    /ttf0 10 Tf                 <-- apply font
    0 0 0 sc
    ( !)Tj                      <-- show glyphs [20, 21], which index is to embedded TrueType font subset
    ET
    Q
    The only embeded font subset is defined as:
    9 0 obj /ttf0 endobj
    10 0 obj /AAAAAA+MSGothic endobj
    11 0 obj
    << /BaseFont /AAAAAA+MSGothic
    /FirstChar 32
    /FontDescriptor 13 0 R
    /LastChar 33
    /Subtype /TrueType
    /ToUnicode 18 0 R                            <-- point to a CMap object
    /Type /Font
    /Widths 17 0 R >>
    endobj
    12 0 obj [ 0 -140 1000 859 ] endobj
    13 0 obj
    << /Ascent 860
    /CapHeight 1001
    /Descent -141
    /Flags 4
    /FontBBox 12 0 R
    /FontFile2 14 0 R                            <-- point to an embedded TrueType font subset
    /FontName /AAAAAA+MSGothic
    /ItalicAngle 0
    /MissingWidth 1000
    /StemV 0
    /Type /FontDescriptor >>
    endobj
    The CMap object after decoded is:
    18 0 obj
    /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo <<
    /Registry (AAAAAB+MSGothic) /Ordering (UCS) /Supplement 0 >> def
    /CMapName /AAAAAB+MSGothic def
    1 begincodespacerange <20> <21> endcodespacerange
    2 beginbfrange
    <20> <20> <6f22>                         <-- "u6F22"
    <21> <21> <5b57>                         <-- "u5B57"
    endbfrange
    endcmap CMapName currentdict /CMap defineresource pop end end
    endobj
    I can write out the embedded TrueType font subset (= "14 0 obj") to a file named "[embedded.ttc|http://sites.google.com/site/cr4eexportpdf/inside-the-pdf/embedded.ttf?attredirects=0&d=1]", which is really a tiny TrueType font file containing only the wrong typefaces for "漢" & "字". It seems everything OK except CR4E failed to choose right typefaces from the TrueType file (msgothic.ttc).
    Is it any help? I am looking forward to any solution.

  • Titlebar on Solaris does not display Japanese characters

    I have a Java Swing application (running on 1.6.0_06) that sets Japanese characters on the titlebar of Dialogs. The Japanese characters display correctly when the application runs on Windows but displays as ? when run under Solaris.
    Details of the Solaris environment:
    Japanese Solaris (UTF-8 encoding)
    Japanese locale (ja_JP)
    Using an X server that has the required font support (because Japanese characters display correctly everywhere except in the titlebar)
    Using CDE as the session manager (and I think dtwn is the window manager used by CDE)
    The funny thing is that the Japanese characters display correctly when I use the JDE session manager instead of CDE, so the problem exists only with CDE and the Open Look interface as well. I tried setting the required resources for WMShell too but that didn't work.
    I seem to be missing some CDE configuration somewhere as the window manager is not able to figure out that the title is non-C locale.
    Any pointers or help in this regard would be appreciated.

    You're probably viewing the website in the wrong character set.
    Try View > Character Encoding > some Japanese encodings, or UTF8 or 16
    The website itself should specify the encoding. The default encoding - in Options > Content - is only used if the website doesn't specify an encoding. Maybe the website you're looking at specifies the wrong encoding.

  • Re:How to display Japanese Characters

    Dear all
    Does any one has idea how to display Japanese characters in PDF output generated by the Reports6i.
    Reports in Discoverer are working fine but when it comes to pdf the Japanese Characters are lost.

    Hi Rohit
    Thanks for prompt reply.
    1) Suppose if we upgrade the Report6i By applying the Latest patch.
    2)Then Develop the reports in 9i editor and run it on live enviornment which is Oracle9iAs (Application server)
    , Reports6i server(patch 14) will it still loss the effects/Can cause problems Later on.
    Thanks
    Jai

  • Charcterset to display Japanese characters

    I am using Oracle 8i
    Database (server) characterset & ncharcharcterset is utf8.
    What value i have to set in Client to display Japanese characters?

    Hello,
    I had the same problem as you have:
    Loading japanese and chinese data
    two steps are necessary:
    1) On XP: Control Panel->Regional and Language Options->Languages tab: aktivate
    "install files for ost asian languages" (you need the winxp install cd!!!)
    2) Run your select statement from SQL*Plus, iSQL*Plus or SQLDeveloper
    Sincerely,
    Christian

  • Can display Japanese characters but can't save to db properly

    Hello! I'm having quite a predicament here! When getting Japanese characters in the database(characters are as-is), it successfully displays them. I manually put it in the database. But when I try to save to the database using the browser(textfields, submits, connections, etc), it saves as garbage.
    Here's the code on my first page. It only gets user input then submits to another jsp
    <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
    <jsp:useBean id="helper" class="com.ats.equipc.DBHelper" scope="request" />
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    </head>
    <body>
         <form name="formOne" action="testOut.jsp">
              in1:  <input type="text" name="in1" />
              <br>
              <input type="submit" value="submit" />
         </form>
         <%! ResultSet rs = null; %>
         <% rs = helper.doGetQuery("select * from t_test;");
              while(rs.next()) {
                   out.print(rs.getString(1) + "<br>");
         %>
    </body>
    </html>Don't mind the Resultset, I just put it there so I can see the saves.
    My second page. This is where I save the entry
    <%@ page contentType="text/html; charset=utf-8" language="java" import="java.sql.*" errorPage="" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <jsp:useBean id="helper" class="com.ats.equipc.DBHelper" scope="request"/>
    <head>
    <title>Untitled Document</title>
    </head>
    <body>
         <%! ResultSet rs = null; %>
         <% request.setCharacterEncoding("utf-8");
              String entry = request.getParameter("in1");
              out.println(entry);
         %>
         <% helper.doSaveQuery("insert into t_test values('" + entry + "');"); %>
    </body>
    </html>Help please...

    Thanks once again for replying
    I got it to work but its still foggy to me why it does work.
    I replaced the code
    <%! ResultSet rs = null; %>
         <% request.setCharacterEncoding("utf-8");
              String entry = request.getParameter("in1");
              out.println(entry);
         %>with this
    <%! ResultSet rs = null; %>
         <% //request.setCharacterEncoding("utf-8");
              String entry = new String(request.getParameter("in1").getBytes("iso-8859-1"), "utf-8");
              out.println(entry);
         %>Take a look at:
    String entry = new String(request.getParameter("in1").getBytes("iso-8859-1"), "utf-8");Why do I need to specify the charset to "iso-8859-1" when getting the bytes then making it "utf-8" when finally making it into a string?

  • Displaying Japanese characters in JSP page

    Hi,
    I am calling an application which returns Japanese characters from my JSP. I am getting the captions in Japanese characters from the application and I am able to display the Japanese captions. After displaying the Japanese captions, user will select the particular captions by selecting the check box against the caption and Press Save button. Then I am storing the captions in the javascript string separated by :: and passing it to another JSP.
    The acton JSP retrieves that string and split it by using tokenizer and store it in the database. When I retrieve it again from the database and display it, I am not able to see the Japanese characters, it is showing some other characters, may be characters encoded by ISO.
    My database is UTF-8 enabled and in my server I am setting the UTF-8 as default encoding. In my JSP pages also, I am setting the charset and encoding type as UTF-8.
    I shall appreciate you if you can help me in resolving the issue.

    Post the encoding-related statements from your JSPs - there are a number of different ones that may be relevant.
    It may also be relevant which database you store the strings in (Oracle, DB2, etc.), since some require an encoding parameter to be passed.

  • Problems in displaying chinese characters with utf-8 encoding

    Hi,
    I got problem in displaying chinese characters in my web application.
    I am creating a web application supporting both English and Chinese charaters. What I am trying to do is:
    1. storing some chinese characters via a web page (page1) into database.
    2. retrieve the chinese characters via another web page (page2) from the database.
    Once I put the Chinese characters on the webpage (page1 in step #1), it displayes well (the readable chinese characters) before I submit this page (after submit, the data will be stored into the database).
    But when I tried to display the chiese characters via page2 in step#2, I got un-readable characters displayed.
    The running configuration is: Sun Application Server (coming and with the JSC2) and MySQL server 5.0. And I setup the database server with utf8 as character-set.
    It seems like the chinese characters got messed up throught the round-trip (from page1<----via jdbc---->database<----via jdbc------>page2).
    From the database, I found the chinese characters are there. Any helps are appreciated.

    Hi,
    I am trying to insert new record.The record may contain chineese or English data.
    I did same what u specified.
    first I converted to the byte UTF8.again,I converted byte to string using 8859_1.
    the values are not storing chinese characters.
    pls suggest me.
    below is my code.
                                  ascCode = req.getParameter("asccode");
                                  countryCode = req.getParameter("countrycode");
                                  ascName      = req.getParameter("ascname");
                                  address1     = req.getParameter("ascaddress1");
                                  address2 = req.getParameter("ascaddress2");
                                  System.out.println("ASC NAME:"+ascName);
                                  System.out.println("ADDRESS1:"+address1);
                                  System.out.println("ADDRESS2:"+address2);
                                  ascC = ascCode.getBytes("UTF8");
                                  coun = countryCode.getBytes("UTF8");
                                  ascN           = ascName.getBytes("UTF8");
                                  add1 = address1.getBytes("UTF8");
                                  add2          = address2.getBytes("UTF8");
                                  System.out.println("ASC NAME:"+ascN);
                                  System.out.println("ADDRESS1:"+add1);
                                  System.out.println("ADDRESS2:"+add2);
                                  ascCode = new String(ascC,"8859_1");
                                  countryCode= new String(coun,"8859_1");
                                  ascName = new String(ascN,"8859_1");
                                  address1 = new String(add1,"8859_1");
                                  address2 = new String(add2,"8859_1");
                                  System.out.println("ASC NAME:"+ascName);
                                  System.out.println("ADDRESS1:"+address1);
                                  System.out.println("ADDRESS2:"+address2);
    thanks.

  • ITunes not displaying Japanese characters...

    Ever since a few days ago, iTunes stopped displaying Japanese characters for any of the songs that have them. They display right on the iPod and on my computer, and even if I re-type them, they continue being boxes. But if I copy and paste a section of cubes and paste it into Google Chrome or anything else, they show up just fine...
    Is there any way to fix that?
    Thanks~

    Have a look at Tome Gewecke's User Tip and let us know if it provides any helpful information for you.

  • Problem to display japanese/multi-byte character on weblogic server 9.1

    Hi experts
    We are running weblogic 9.1 on linux box [REHL v4] and trying to display Japanese characters embedded in some of html files, but Japanese characters are converted into a question mark [?]. The html files that contain Japanese characters are stored properly in the file system and retained the Japanese characters as they should be.
    I changed character setting in the html header to shift_jis, but no luck. Then I added the encoding scheme for shift_jis in jsp_description and charset-parameter section in weblogic.xml but also no luck.
    I am wondering how I can properly display multi-byte characters/Japanese on weblogic server without setting up internationalization tools.
    I will appreciate for your advice.
    Thanks,
    yasushi

    This was fixed by removing everything except teh following files from the original ( 8.1 ) domain directory
    1. config.xml
    2. SerializedSystemIni.dat
    3. *.ldift
    4. applications directory
    Is this a bug in the upgrade tool ? Or did I miss a part of the documentation ?
    Thanks
    --sony                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Maybe you are looking for

  • Active X 9.0b for Lord of the Rings g

    Battle for Middle Earth says it needs the above capability for the sound card on my computer. Which card has such capability? I have CreativeAudio PCI SB 64/28 ES370. That information comes from Control Panel Sound Devices. I have had problems with t

  • How to refer a particular filed of a Table data type

    DECLARE           CURSOR C1 IS SELECT                                    GLUSR_USR.GLUSR_USR_ID BYER_ID,                                    GLUSR_USR.GLUSR_USR_ADD1 BUYER_ADD           FROM                GLUSR_USR           WHERE                ROWN

  • How do i separate emails from the same person

    I do not want emails back and to the same person archived into one. Is there a way to separate them?

  • Java3D installation problem

    Downloaded java3d-1_2_1_01-win32-directx-sdk.exe InstallAnywhere didn't show me the JVM selection screen and it didn't install anything. The registry has the JavaSoft SDK 1.3 & runtime 1.3 entries. I am running Windows ME with DirectX 8.0 Any idea ?

  • Web Interface Builder & Variable???

    Hi, Can someone help me to resolve this two issues. I try to create variables by using web interface builder. <b>1)</b>The variable- company code-<b>US100, CA100</b> are only ones I use in the selection of my planning leveL. <b>However, it shows all