Parcing special characters.... - 30/08/04 05:22 AM
I'm making a script that reads text from a socket and sometimes the text contains special characters that show up as Ô well I thought it would be simple to just change it to $chr(212) for the script so i wrote an alias.
But no matter how I try to change it the alias either adds spaces around the character, or displays the identifier in the text.
Example:
Reads from the socket: Ôtsuka
After running through the alias I get:
$chr(212)tsuka OR with changes Ô tsuka
It should look like: Ôtsuka
I've spent too much time trying to fix it and it being 1:30am isn't helping. Any ideas?
Code:
alias chrcheck { if ($1 != $null) { var %i = $replace($1-,&#, $chr(36) $+ chr $+ $chr(40), $chr(59) ,$chr(41) ) return %i } }
But no matter how I try to change it the alias either adds spaces around the character, or displays the identifier in the text.
Example:
Reads from the socket: Ôtsuka
After running through the alias I get:
$chr(212)tsuka OR with changes Ô tsuka
It should look like: Ôtsuka
I've spent too much time trying to fix it and it being 1:30am isn't helping. Any ideas?