Jump to content

substr and unicode


Andarian

Recommended Posts

I've tried searching first.. but couldnt really tell how to find a name for my problem.. I'm sure others have been running into the same problem as well.

 

The problem is when I try to use substr to cut some text from a large utf-8 string, I cant tell how much to cut because the encoding length is variable. (or is it?)

 

Anyone has an idea?

Link to comment
https://forums.phpfreaks.com/topic/82368-substr-and-unicode/
Share on other sites

The mb extension must be enabled to use mb_ functions....

 

I don't remember the name of it, but it should be with the other commented out extensions in php.ini.....  Or, if you don't have the access to enabled that, you might have to recreate it or find a different method.

Link to comment
https://forums.phpfreaks.com/topic/82368-substr-and-unicode/#findComment-418839
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.