|
|
Subject:
how to convert chinese character from decimal representation to HanZi?
Category: Computers > Programming Asked by: mlfolk_wa-ga List Price: $6.00 |
Posted:
22 Jun 2005 02:52 PDT
Expires: 22 Jul 2005 02:52 PDT Question ID: 535777 |
I need a c# code that can convert the decimal representation to hanzi. for example: convert 北京 to ??, etc. |
|
There is no answer at this time. |
|
Subject:
Re: how to convert chinese character from decimal representation to HanZi?
From: curiously_reptilian-ga on 22 Jun 2005 12:16 PDT |
It would be helpful to know more about the application. Is the HanZi to be displayed on a web page, or is this a local Windows application? If it is a web page what you want to do is convert the HTML Character Entity Reference (the 北 part) into the correct encoding for the page, which is typically Unicode. See http://www.on-the-matrix.com/shared/HtmlEntityReferences.asp for more info. |
Subject:
Re: how to convert chinese character from decimal representation to HanZi?
From: mlfolk_wa-ga on 22 Jun 2005 13:13 PDT |
It is a web application. the decimal part were retrieved from database. when I use it in a normal web page with encoding: <meta http-equiv="Content-Type" content="text/html;charset=gb2312"> the decimal part gets translated to correct chinese charater (by browser?). for example, 北京 are displayed as ?? in IE automatically. However, if I use similar codes in a mobile application (using .net mobile form), the decimal parts were not converted to the Hanzi. That is why I thought it will be helpful if there is a function (preferablly in c#) that I can use to force the conversion from decimal part to Hanzi. I know there is such function available, see: http://www.kongming.net/novel/hanzi/convert/ if you enter 北京 in the Input box, and click encode, you will see it is converted to Hanzi. but I dont have an idea how it does the conversion behind the scheme. what function is used, etc. thanks |
Subject:
Re: how to convert chinese character from decimal representation to HanZi?
From: mlfolk_wa-ga on 23 Jun 2005 03:10 PDT |
I figured out the solution. this is a simply Server.HtmlDecode() call. I am not sure why I did not realize this in the first play. I consider this issue resolved. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |