Solved

Unicode

Posted on 2006-07-23
7
270 Views
Last Modified: 2010-03-31
Hi guys,

I am confused now. I am trying to submit chinese input to my WebLogic app.

If I specified
<%@ page language="java" contentType="text/html;charset=ISO-8859-1"%>

it returns something like
&#24536; &#24535;...blah blah

but if I specified
<%@ page language="java" contentType="text/html;charset=UTF-8"%>

it returns me something like
&#xE5; &#xBF

Well, I think that the appropriate ways is to use UTF-8 but now I am confused why ISO-8859-1 is capable to handle &#24536;. I thought that ISO-8859-1 is only for Latin language and it should not accept Chinese (unicode)?

David
0
Comment
Question by:suprapto45
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
7 Comments
 
LVL 13

Expert Comment

by:marchent
ID: 17165597
>> <%@ page language="java" contentType="text/html;charset=UTF-8"%>

there are few encoding schemes for unicode, try for all
UTF-16 works with chinese letter.

~marchent~

0
 
LVL 30

Expert Comment

by:Mayank S
ID: 17167828
>> I thought that ISO-8859-1 is only for Latin language and it should not accept Chinese

I guess it can handle Chinese too.
0
 
LVL 16

Author Comment

by:suprapto45
ID: 17172809
Thanks guys :),

marchent >> Can you explain me why my confusion above is happening?

mayankeagle >> Yeah, I think so but when I tried to *google* it, ISO only lists out English as well as Latin characters. There is no single site mentioning that ISO can handle Chinese in whatever way.

David
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
LVL 16

Author Comment

by:suprapto45
ID: 17172814
Btw,

Why don't we have another thread to congratulate you, mayankeagle to reach Java genius?

Well, CONGRATULATION........you are one of the genius in Java now ;)

David
0
 
LVL 13

Accepted Solution

by:
marchent earned 500 total points
ID: 17173499
i'm not sure why that is happening with u. but u can check here how the unicode encoded in various way

http://czyborra.com/utf/
http://www.cl.cam.ac.uk/~mgk25/unicode.html

~marchent~
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 17173678
>> Why don't we have another thread to congratulate you, mayankeagle to reach Java genius

Thanks :) I don't know - ask Venabili on her recent PE notifier thread ;-)
0
 
LVL 16

Author Comment

by:suprapto45
ID: 17174159
Thanks
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This video teaches viewers about errors in exception handling.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question