Hello everybody!
this is my first post here : ) hoping to get the help i need

i coded a php script and i had to use multibyte functions in it like mb_substr

but when i uploaded it i figured out this mb extension is not installed on the server! i requested my webhosting to install it and they did but the problem is i might oneday need to use this script on a server that wont have this extension installed

so is there anyway around it? a class maybe or any other way to work with multibyte strings and use those functions on them without having this extension installed?

thanks in advance

    PHP 6 is supposed to include unicode support, but I've not seen anything recently even hinting when it might be released.

      The pages for ord and chr at www.php.net have user provided comments with code to deal with the same functionality for utf-8 strings. Looking at those and/or reading the spec for utf-8 encoding should provide you with enough knowledge to determine how many bytes a specific character takes, thus allowing you to write your own utf-8 handling code in PHP.

      But in my opinion any host not providing utf-8 functionality is not worth using. It has been used for a long time, and dealing with utf-8 is common, especially on the web.

        Write a Reply...