
August 17th, 2003, 04:42 PM
|
|
Junior Member
|
|
Join Date: Aug 2003
Posts: 1
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
How to validate fonts for a particulaer language?
I am trying to setup an asp.net page (using VB.net) that would validate fonts that would support Chinese. I have used the InstalledFontCollection function to retrieve the fonts available on the machine and output the option in a dropdownlist. If the user select one of the fonts on the dropdownlist, for example, if the user chose "Arial", a message would display that it would not support Chinese. I am just wondering how will I find out from the font property(or any method) if a font supports a particular language/locale or not? Any help would be much appreciated.
Also another asp.net page allows the user to select a Chinese character (Big5, CNS and Unicode), it seems to work fine (using session.code) until I put in a textbox to allow the user to input Chinese characters, once the page was processed the characters become incomprehenible (unless the user chose Unicode in which case everything is fine!!), I have used the following code:
Session.CodePage = 950
or
Response.ContentEncoding = Encoding.GetEncoding(big5)
and output of the following is the right codepage
response.write(response.ContentEncoding.EncodingNa me)
i.e.Big5 or CNS
However, the text in the textbox is not what I first entered. I don't want to change the <Globalization> in the webconfig, as this is not dynamic. Any suggestion how to fix this? So the text will be encoded in the right method. Thank you very much. I have searched the net and posted to forums but the suggestion (Response.ContentEncoding = Encoding.GetEncoding(big5)) did not work. Any help will be appreciated.
Thanks
Jo
|