Questions tagged [mbstring]

MultiByte String in PHP

Related topics:

195 questions
18
votes
2 answers

PHP Security: how can encoding be misused?

From this excellent "UTF-8 all the way through" question, I read about this: Unfortunately, you should verify every submitted string as being valid UTF-8 before you try to store it or use it anywhere. PHP's mb_check_encoding() does the trick,…
user1162541
17
votes
3 answers

What do these PHP mbstring settings do?

I'm trying to figure out exactly what these php.ini settings do. What happens when they're set to different values? When are they necessary? When are they…
JW.
  • 50,691
  • 36
  • 115
  • 143
16
votes
5 answers

PHP: Split multibyte string (word) into separate characters

Trying to split this string "主楼怎么走" into separate characters (I need an array) using mb_split with no luck... Any suggestions? Thank you!
Peterim
  • 1,029
  • 4
  • 16
  • 25
12
votes
2 answers

How do I install php mbstring extension in to Nginx Ubuntu

I need this php extension in order to use one of my Magento extension. How do I install php mbstring extension to my Nginx Ubuntu 14.04?
n01
  • 135
  • 1
  • 1
  • 7
11
votes
3 answers

What is the purpose of the MB_CASE_*_SIMPLE constants?

According to the manual, the following constants have been added in PHP 7.3: MB_CASE_FOLD MB_CASE_LOWER_SIMPLE MB_CASE_UPPER_SIMPLE MB_CASE_TITLE_SIMPLE MB_CASE_FOLD_SIMPLE I found an example of what MB_CASE_FOLD does: echo mb_convert_case('ẞ',…
BenMorel
  • 34,448
  • 50
  • 182
  • 322
11
votes
1 answer

iconv or mbstring?

Which multibyte-handling library should I use : iconv or mbstring ? After some Googling I didn't find enough arguments to convince me to use one particularly, and I could not get any benchmark (and I'm too lazy do create one :-p). After all maybe…
Maxime Pacary
  • 22,336
  • 11
  • 85
  • 113
11
votes
9 answers

centOS 7 Can't install php-mbstring extension

i've tried to install the extension mbstring but i have the following error: Error: Package: php-mbstring-5.4.16-23.el7_0.3.x86_64 (updates) Requires: php-common(x86-64) = 5.4.16-23.el7_0.3 Installed:…
KrqcS
  • 351
  • 1
  • 2
  • 7
10
votes
5 answers

Debug iconv_strlen error - PHP 5.5

I am trying to export a document to PDF using Laravel & DomPDF. This works on my mac, but not on staging or live server. Error as follows: I have no idea what this means, and cannot find any solutions. iconv_strlen(): Wrong charset, conversion…
Gravy
  • 12,264
  • 26
  • 124
  • 193
8
votes
1 answer

How do I enable mbstring extension on PHP 5, Fedora server

I need to add the mbstring extension to an install of PHP 5.2.6 on Apache/2.2.11 (Fedora). We have dynamic extensions enabled so I really think all I need is the .so file and .ini files, correct? Can I simply drop these files in and make it work or…
JFOX
  • 245
  • 1
  • 6
  • 14
8
votes
3 answers

the requested PHP extension mbstring is missing from your system

my error message that I am getting from the composer is: Your requirements could not be resolved to an installable set of packages. Problem 1 - Installation request for laravel/framework v5.4.28 -> satisfiable by laravel/framework[v5.4.28]. …
Martin Savov
  • 118
  • 1
  • 1
  • 7
8
votes
2 answers

mb_strlen() is it enough?

When counting the length of an UTF-8 string in PHP I use mb_strlen(). For example: if (mb_strlen($name, 'UTF-8') < 3) { $error .= 'Name is required. Minimum of 3 characters required in name.'; } As the text fields can accept any language…
PHPLOVER
  • 7,047
  • 18
  • 37
  • 54
7
votes
2 answers

PHP 7.2 and modules 'dom', 'mbstring', and 'simplexml'

I installed PHP 7.2 on my server and everything works fine except these three issues: I face these problems: The PHP extension dom is not loaded. Please contact your server administrator or visit http://php.net/manual/en/dom.installation.php …
Ali
  • 101
  • 1
  • 1
  • 5
7
votes
5 answers

PHP: Call to undefined function mb_strlen() - on custom compiled PHP with mbstring enabled

I have this custom compiled PHP (v5.3.3) with the following extensions enabled (via configure): ./configure --prefix=/usr/local/php5.3.3 --with-config-file-path=/usr/local/apache2/conf --with-apxs2=/usr/local/apache2/bin/apxs --with-bz2…
miCRoSCoPiC_eaRthLinG
  • 2,910
  • 4
  • 40
  • 56
7
votes
1 answer

Composer can't find ext-mbstring even though it is installed

When I attempt to install Laravel 5 I get a dependency error. I'm using Uniform Server on Windows 7. I have enabled php_mbstring.dll and I checked it's loading properly. (I think) Here is the console output (Composer): Here are the extensions in my…
CoCoMonk
  • 512
  • 1
  • 5
  • 9
7
votes
1 answer

mb_convert_case undefined function (Symfony2 FOS/UserBundle)

On my Symfony2 application, I am receiving an error: Fatal error: Call to undefined function FOS\UserBundle\Util\mb_convert_case() in /Applications/MAMP/htdocs/application/vendor/bundles/FOS/UserBundle/Util/Canonicalizer.php on line 18 I am using…
Xavier
  • 107
  • 2
  • 9
1
2
3
12 13