Chinese Character cannot be decoded

hi,
I would like to implement two JSP pages. The first JSP is just a html form, which is used to submit unicoded chinese data to a target JSP file.
The target JSP file received those data and display.
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> is added in the first JSP file. As a result, data will be submitted in UTF-8 format.
In target JSP, I used the following code to recieve and decode data:
<%@ page contentType="text/html; charset=UTF-8" %>
<%
String para = request.getParameter("para"); // where para is name of received parameter
byte[] bytes = para.getBytes();
para = new String(bytes, "UTF-8");
out.println("Recieved character: " + para);
%>
My Problem:
After I submitted chinese characters from the first JSP file, only some of them can be displayed on target JSP. Some of those characters are missing.
For example, when I input "�@", target JSP can display the character. On the other hand, when I input "�p", nothing is displayed. But I know that variable "bytes" stored 3 bytes for each chinese character. I would like ask why
para = new String(bytes, "UTF-8");
cannot encode properly. Is anything wrong about my coding?
Thx

More information can be provided.
OS: Windows 2000 server
web server: iPlanet
P.S. : I have set the Character set to UTF-8 in iPlanet.
thx.
hi,
I would like to implement two JSP pages. The
The first JSP is just a html form, which is used to
submit unicoded chinese data to a target JSP file.
The target JSP file received those data and
and display.
<meta http-equiv="Content-Type"
ype" content="text/html; charset=UTF-8"> is added in
the first JSP file. As a result, data will be
submitted in UTF-8 format.
In target JSP, I used the following code to
to recieve and decode data:
<%@ page contentType="text/html; charset=UTF-8"
F-8" %>
<%
String para = request.getParameter("para"); //
// where para is name of received parameter
byte[] bytes = para.getBytes();
para = new String(bytes, "UTF-8");
out.println("Recieved character: " + para);
%>
My Problem:
After I submitted chinese characters from the
m the first JSP file, only some of them can be
displayed on target JSP. Some of those characters are
missing.
For example, when I input "�@", target JSP can
P can display the character. On the other hand, when I
input "�p", nothing is displayed. But I know that
variable "bytes" stored 3 bytes for each chinese
character. I would like ask why
para = new String(bytes, "UTF-8");
cannot encode properly. Is anything wrong about my
coding?
Thx

Similar Messages

  • Window 8.1 Chinese character cannot display properly in a game even though I have downloaded and install all chinese language packs

    Hi,
    The operation system for my computer is Window 8.1. I am currently trying to install a chinese game. Even though I have downloaded and install all the chinese language pack, I have even set the regional language locale to chinese (similified / traditional),
    the chinese characters will not display properly in the game. Some people told me i need to set the locale to Chinese PRC, but I am not sure where to download this PRC language pack for window 8.1 (as I only have chinese simplified and chinese traditional).
    I would greatly appreciate if someone can give me a hand in solving this problem. Thank you for your help in advance. 

    Hi,
    The operation system for my computer is Window 8.1. I am currently trying to install a chinese game. Even though I have downloaded and install all the chinese language pack, I have even set the regional language locale to chinese (similified / traditional),
    the chinese characters will not display properly in the game. Some people told me i need to set the locale to Chinese PRC, but I am not sure where to download this PRC language pack for window 8.1 (as I only have chinese simplified and chinese traditional).
    I would greatly appreciate if someone can give me a hand in solving this problem. Thank you for your help in advance. 
    Hi,
    Please open Region, under administrative -> Language for non-Unicode programs: choose Chinese.
    Kate Li
    TechNet Community Support

  • Cannot print Chinese character in postscript 11iAS

    We are using HRMS 11.5.10AS.
    We want to print the report in postscript. However, some chinese character cannot be print correctly. ( it's right in TXT )
    Anyone know how to solve it?

    chulongjiang,
    i solve the problem with your advice, thanks lot!
    Regards,
    Alan 24/11/2005

  • Email cannot show Chinese character.

    Hi,
    When I read emails in my ipod touch, the Chinese character cannot be shown properly. They appear to be all chaotic characters. Can someone help me what I should set up/install in order to view the Chinese character?
    Thanks in advance.

    Tom Gewecke wrote:
    I think that currently only emails in Unicode may be displayed correctly and there is no way yet to adjust the encoding for other kinds.
    Are you sure about that? What about Western encoding for the French and German?
    Or is this yet another reason for me not to buy an iPhone?

  • Chinese character input, chinese character input

    I intalled Lion OS 10.7.3. however, chinese input (hand writing) cannot be used.
    i can call the application, but no chinese character cannot be input, especially when i used it on Safari.

    Cross posting
    http://forum.java.sun.com/thread.jspa?messageID=9831600

  • Acrobat Reader cannot display Traditional Chinese Character correctly in 64 bit Windows 7

    Hi,
    I get a pdf file cannot display chinese character properly in Windows 7 64 bit but Windows XP 32 bit.  I did uninstall and re-install Reader 9.4.3 and 10.0.1 with and without Traditional Fonts patch in the 64 bit machine but no luck.  Does anyone have a solution for this?
    Thanks in advance.

    I run Acrobat 9.3.3 on my Windows 7 Pro 64-bit system with no problems. Perhaps you should make sure you have all of Acrobat 9's maintenance installed.
    Ken Friedman

  • Cannot display Chinese Character in ver 10.1.3

    Hello,
    I would like to ask one more question, when i run my program, it contain two jsp pages,
    the first one is to ask the user to input some chinese character, then the second one is to display the input data in the second page. I found out that the second one cannot display the input chinese character, but other chinese character in the second one can be display.
    Some of my code in the second one are as follow:
    String firstName = request.getParameter("firstName");
    &#20013;&#25991; <%=firstName%>
    The result are displayed are displayed as follow:
    &#20013;&#25991; ?T???\!
    It seems to me that the text can display but the variable cannot display, does any one know the reason?
    One of the replies from the JDeveloper forum are as follow:
    I seem to recall there was a bug in the 10.1.3 OC4J with passing parameters on the URL in other languages. You might want to ask on the OC4J forum:
    OC4J
    Regards,
    Alan 20/11/2005

    chulongjiang,
    i solve the problem with your advice, thanks lot!
    Regards,
    Alan 24/11/2005

  • Mapbuilder cannot display chinese character properly

    I downloaded the latest mapviewer package.I found the mapbuilder cannot display chinese charater properly.neither the charater readed from database,nor the charater I typed. Every chinese character is substitude by a blank square.Anyone have good suggestion?

    Hi,
    this early preview has not been tested in other
    languages than English. We are aware of this problem
    with Chinese characters, and it may be related with
    font, but
    needs more investigation. Which Windows version are
    you using?
    To start the program setting the language to English
    you can try:
    java -jar -Duser.language=en -Duser.region=US ...
    Thanks.
    JoaoI tried . but no helpful. an My os is windows xp

  • Cannot submit chinese character in Parameter Form

    Hi all report professionals, when I tried to submit chinese character as an input parameter via the Online Report Parameter Form, the report server cannot recognise it as a chinese character. This scenario does not happened when I use Oracle Report Developer to run the report.
    I have already set paramform=yes in the URL. Any other setting or configuration is needed to be set to solve the problem ? Thanks

    I have the same problem. For my case, I have a parameter form which require the user to key in some Chinese. After generated the report, those Chinese parameters displays as some symbols in the report. I have tried to change the code page of the parameter form as Chinese Big5. It is the same.
    Can anyone give me a hand on this?
    Thanks.

  • IPod cannot show chinese character now, previously can

    Hi everyone,
    Thanks for trying to help.
    So I have some songs with Chinese characters in the song names. They work perfectly fine, I mean before, when they become symbols, I just use the ID3Mod to convert them and import them into my iPod nano and I can see all right names.
    Now, I don;t know what happened, I just discovered today. I found that most of the chinese characters cannot be displayed, they did not become strange monsters symbols, but " " blank.
    Do Anyone have any idea what have happened ?
    The thing I did today is just import a few new songs.
    P.S: those names shown perfectly well in iTunes
    Thanks very much.
    Message was edited by: memoryrecalls

    I've got the same problem with itunes, quicktime, and also imported Safari bookmarks (the list is doubtless longer than that, but that's what I use and have noticed so far)
    The OS recognises the Chinese, in fact in most cases I wrote the Chinese text in Mac OSX, and it displays the text correctly in the file name but when you open in itunes or quicktime it's scrambled into nonsense.
    Since Chinese people constitute 1.3 Billion consumers that's a pretty poor show from Apple.. (LOL)

  • Cannot print out chinese character

    Hi All,
    I have problem with the printer. I can printed Chinese character without using SAP and from SAP when I print the Chinese character is not come out. On the paper will appear symbol ###. I don't how want to do.
    FYI, my system is Unicode.
    Thank You
    Regards,
    anang78

    Hi,
    Check the OSS note 776507 which talks about print preview for
    characters in Chinese language and print of ## characters during printing Asian languages.
    Please go through the note , as per section " Note on SAPscript/SmartForms Print Preview "
    we need to use device type CNHPLJ4 for printing Chinese character set.
    Thanks
    Jibin

  • Problem with chinese character for dot matrix epson LQ-1600K III

    Hi All,
    I really runs out of idea about my problem now. The problem is about Print Chinese character to dot matrix printer (Epson LQ-1600K III). I tried to so many device type to solve this issue, looks like the only device type can be use are CNSAPWIN and CNEPSON with CNSONG font type. The others if I print to the printer, the chinese character became # (although in the print preview it`s okay and display correctly).
    Here is the bottleneck if I use CNEPSON:
    - if I have 2 window at the left and right position, if the left window has chinese character, the right window automatically shift right about 1.5 CM, which is damn weird!!! Can somebody help me
    - I tried so many ways to adjust the line size for my detail window (to cater positioning at pre-printed boxes), but looks the font size always become 10pt and line size cannot be adjustable (based on smartstyle).BUT if I used device type epescp2, it can be done!
    Here is the bottleneck if I use CNSAPWIN:
    - I need to create format type in windows and SAP (SPAD). and every PC that use this printer, must define the Paper size ( China Special paper size 12inch)
    - I also think this is not a good idea because as I far as I know this is not the correct way..
    Therefore, if somebody has experience about printer chinese character to dot matrix for Smartform and sapscript..please kindly help me give some advice.
    Do I use the wrong device type?
    Thanks in advance!
    Regards,
    Willy

    Hi friends , we are using the same model ....
    Are you using the chinese version operation system ? because we can print the chinese charaters without problem in LQ 1600KIII .....
    We are using CNSAPWIN device type + Frondend printing access method ....
    Carlos Zhang

  • SOAP Response cannot be decoded.

    Hello Everybody,
    I created a simple web service in asp.net using the c# sharp language. The web service extracts data from an MS SQL Database, translates that data in to xml, assigns the xml to a string varible and returns  the string varible to what ever called the service. I know the web service works becuase if you call it in a web browser at the following address http://www.jmmortimer.com/dataaccess/sqlhelper.asmx?wsdl, it will show you the xml that represents web service. Plus, I tested it by calling it in an asp.net application. However when I call it from a Flex 3 application it gives me the following error message. SOAP Response cannot be decoded. Raw response: " faultCode="DecodingError" faultDetail="null" The code that I have in Flex 3 is below. If anyone knows how to solve this problem, please let me know. Thanks in advance.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application 
    xmlns:mx=http://www.adobe.com/2006/mxml layout="absolute">
    <mx:Script>
    <![CDATA[
    import mx.rpc.soap.LoadEvent;
    import mx.rpc.events.ResultEvent;
    private function getData(evt:LoadEvent):void
    var connString:String = "Data Source=Family\SQLExpress;Initial Catalog=SDJames;User ID=sa;Password=Password1";
    var storedProc:String = "GetAuxiliaries";
    myService.GetDataTable(connString, storedProc)
    private function resultHandler(evt:ResultEvent):void
    test.text = String(evt.result);
    ]]> 
    </mx:Script>
    <mx:WebService id="myService" wsdl="http://jmmortimer.com/dataaccess/sqlhelper.asmx?WSDL"
    load="getData(event)" result="resultHandler(event)" />
    <mx:TextArea id="test" x="10" y="10" width="452" height="348"/>
    </mx:Application>

    Hello Again Everybody,
    I have found the answer to my problem. The Problem was that I had the wrong value assigned the variable "connString" insted of  "Data Source=Family\SQLExpress;Initial Catalog=SDJames;User ID=sa;Password=Password1", it should have been "Data Source=Family\\SQLExpress;Initial Catalog=SDJames;User ID=sa;Password=Password1". Don't you just hate how just  messing up with one character can mess up you entire application. Thanks to everybody who took time to look over my problem.
    God Bless

  • Output chinese character to CSV file in UNIX

    Hi
    I encountered ABAP dump whenever output chinese character to CSV file in UNIX in ECC6. Error show as
    "At the conversion of a text from codepage '4102' to codepage '1100':
    - a character was found that cannot be displayed in one of the two
    codepages;
    - or it was detected that this conversion is not supported"
    The program with coding of statement OPEN DATASET xxxxx FOR OUTPUT IN TEXT MODE  ENCODING NON-UNICODE. Reason to output to OPEN statement to non-unicode as users would like to open the csv file thru Excel directly. They do not wish to open the text file in Excel. Can Experts please share with me how to overcome the problem?
    Thanks
    Kang Ring

    May be you could give a try with the following code and check
    OPEN DATASET xxxxx FOR OUTPUT IN TEXT MODE ENCODING NON-UNICODE CODEPAGE '4103'.
    Vikranth

  • Chinese Character

    I am a new user of Blackberry 8300, actually the handheld was a gift from my colleague which she
    bought in Europe, I have chosen the mobile/internet service from Hutchison 3 company for both
    mobile phone and e-mail connection, everything is working properly except the e-mail description
    cannot be displayed or shown in Chinese Character, I've been seeking for the help of the Hutchison
    people as well as download the relevant softwear, follow the guideline of the installation process, the
    situation remained the same, the Chinese Character still displayed in black square dots.
    The question is, if the hand held was not from the local dealer, it cannot be changed to Chinese language?
    Second is, where can I find the software installation or hand held modification for Chinese version.
    Third, I found the new Blackberry 3G hend held on some websites and magazines, when you are going to
    launch theses models?
    Thanks!
    Kenneth. (Kmcchan)

    americangothic wrote:
    How I am going to install this is still a mystery as I have no idea how any of this BB software works.
    http://supportforums.blackberry.com/t5/BlackBerry-Device-Software/How-To-Reload-Your-Operating-Syste...
    The search box on top-right of this page is your true friend, and the public Knowledge Base too:

Maybe you are looking for

  • XML Gurus: help with cloning a node without using clone!

    Dear all, I have to copy one piece of XML from one part of the document to another. Unfortunately I cannot simply do a copy and paste: Node nodeLeaf = nodeChild.cloneNode(true); nodeAncestor.appendChild(nodeLeaf); because some fragments of the nodeLe

  • PR/PO DERELEASE

    Dear All, We have a requirement : In multi level release strategy if,  PR/PO is rejected at any level, it should trigger derelease at all the previous levels and E mail notification to be sent to all the levels. We are trying with the help of work fl

  • Regarding tables for Invoice

    Hi What are the tables for INVOICE. Regards Sandeep. Edited by: Sandeep Reddy on Feb 28, 2008 3:41 PM

  • In the query out put,right click on k.f,there we fine one option HIDE

    why we use it?

  • I can't find startrfc.exe in SAPGUI 640

    I use the program startrfc.exe to execute a function of sap to print invoices, but with the new version of sapgui 640 this file doesn't appear. Where can I find this file, or how can I execute this function out of sap? Thanks in advance. Best regards