Log in

View Full Version : Converting a character into ISO 646 encoding



codeexploiter
09-26-2006, 05:08 AM
Hi

Is there any method for converting a character into a 7 bit ASCII HTML value based on ISO 646 character encoding using PHP?

Thanks in advance for your help

Code Exploiter

djr33
09-26-2006, 08:50 AM
Maybe related to this:
http://us3.php.net/manual/en/function.html-entity-decode.php
??
Looks around that page for links that might be related too, I'd say.

codeexploiter
09-26-2006, 09:06 AM
thanks but the function doesn't support ISO 646. Still looking about this

mwinter
09-26-2006, 11:25 AM
Is there any method for converting a character into a 7 bit ASCII HTML value based on ISO 646 character encoding using PHP?

No built-in way, as far as I know. If you know which ISO-646 variant is in use, you could use the two-argument form of the strtr (http://uk.php.net/strtr) function to generate the appropriate entity or character references.

Mike

djr33
09-26-2006, 11:42 AM
Ah, sorry. I stumbled upon that the other day when I was searching for another function. Thought it might at least be related.

Is there a way to load a character table into a function?

codeexploiter
09-26-2006, 11:52 AM
Thanks mike for the direction, i'll check that out