Hi, I dont know where Unicode mail list is, this is off the list topic.
my problem may simply be described with one sentence that why
createUnicodeString("��") is different with "\u6C49" when they are shown
on the browser or inserted into database, in fact they are the same String ,
both are "\u6C49".
I use function createUnicodeString that is from jdk1.1.6 demo i18n
CollateDemo.java, for I need the unicode to be created in the java program ,
native2ascii can not fit my demand.
The following code, out.println("<br>createUnicodeString=") show \u6C49 ,
and out.println("<br>unicode=" "\u6C49") show the chinese character code ��
, I dont know Why. In fact, they should be the same, but here one is I18n,
another is
/uxxxx.
response.setContentType("text/html; charset=GB2312");
PrintWriter out = response.getWriter();
String cc="��";
String x = createUnicodeString(cc);
|| out.println("<br>createUnicodeString="); <------- show \u6C49
|| out.println("<br>unicode=" "\u6C49"); <------- show the chinese
character code
public String createUnicodeString(String source) // this function is
from jdk1.1.6
{ // demo i18n
CollateDemo.java
StringBuffer result = new StringBuffer(source.length());
// .... translate the source to unicode: /uxxxx/uyyyy
return result.toString();
}
Thanx.
Jack
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html