|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
character to html converstion
does anyone know know of any functions i can use, to take a chinese character and the such, and convert them to i think it's html equivilants, where you turn a chinese cahracter to &45678; or such. Language isn't really an issue with the exception of perl.... my current method involves pasting it in frontpage and then removing the charset and it does it for me =( it'd be sweet to automate this...i'm currently using asp, vb.net to do most of the stuff so if you know it in that language it'd be preferred....if not, hey, i'll take the advice... worse case senario, anyone know an algorithm to do this?
Last edited by unatratnag : August 20th, 2003 at 10:24 PM. |
|
#2
|
||||
|
||||
|
IIRC, the HTML equivalent of a character is simply the unicode value converted to hexadecimal (with an & sign in front and a ; at the end, of course). So, all you need to do is convert each char to its unicode value and then convert that value to a hex string. My VB is a little rusty, but I believe AscW() and Hex() are probably what you need for this.
HTH ![]()
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Software Design > character to html converstion |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|