I haven't tried this but you may be able to get somewhere using the iconv functions.
such as: iconov_strlen(), iconov_strpos(), iconov_strrpos(), iconov_substr()
According to the PHP5 manual:
With the iconv module, you can turn a string represented by a local character set
into the one represented by another character set, which may be the Unicode
character set.
Isn't this what you want to do?
So if you plugin the algorithm for mapping between character sets you should be ok...
--
Nalaka Jayasena (නාලක ජයසේන)
http://nalakajayasena.wordpress.com