Questions tagged [mbstring]

MultiByte String in PHP

Related topics:

195 questions
4
votes
1 answer

php in_array multibyte equivalent

Is in_array() function in php multibyte safe? If not ,how can i make it so? The php.net multibyte reference lists mb_stristr() but it accepts a string , not an array as haystack . My haystack = array of strings and needle = string.
zacurry
  • 876
  • 3
  • 12
  • 25
4
votes
1 answer

php mb_convert_case() keep words that are in uppercase

Assuming I have a string "HET1200 text string" and I need it to change to "HET1200 Text String". Encoding would be UTF-8. How can I do that? Currently, I use mb_convert_case($string, MB_CASE_TITLE, "UTF-8"); but that changes "HET1200" to "Het1200. I…
Lyon
  • 7,354
  • 10
  • 33
  • 46
4
votes
3 answers

PHP/MySQL Encoding

I have a website, with arabic content which has been migrated from a different server. On the old server, everything was displaying correctly, supposedly everything was encoded with UTF-8. On the current server, the data started displaying…
Adon
  • 345
  • 1
  • 12
4
votes
2 answers

Table already utf8 charset, still getting question marks in some characters

I'm trying to change my encoding to utf-8, below is what I have so far. Table Charset mbstring installed extension=php_mbstring.dll mbstring configured in php.ini mbstring.language = Neutral mbstring.internal_encoding =…
vephelp
  • 552
  • 2
  • 10
  • 24
4
votes
1 answer

When do I need to enable mbstring in PHP?

mbstring extension provides enhanced support for Simplified Chinese, Traditional Chinese, Korean, and Russian in addition to Japanese. I tried displaying a Japanese character (which I copied from www.google.co.jp) on my PHP page and it displayed…
John Eipe
  • 10,922
  • 24
  • 72
  • 114
4
votes
5 answers

Ensure that PHP is compiled with php_mbstring.dll enabled

I'm currently experiencing error on my application using php. here is the error message Error - mPDF requires mb_string functions. Ensure that PHP is compiled with php_mbstring.dll enabled. I'm using third party library to generate pdf file (MPDF).…
Bryan
  • 1,245
  • 5
  • 22
  • 37
4
votes
1 answer

How to check if a string can safely be converted in another character set without loss?

Is it possible, prior to converting a string from a charset to another, to know whether this conversion will be lossless? If I try to convert an UTF-8 string to latin1, for example, the chars that can't be converted are replaced by ?. Checking for ?…
BenMorel
  • 34,448
  • 50
  • 182
  • 322
4
votes
3 answers

Where can I get a complete list of all multi-byte functions for PHP?

Where can I get a complete list of all multi-byte functions for PHP? I need to go through my application and switch the non MB string functions to the new mb functions.
Kladskull
  • 10,332
  • 20
  • 69
  • 111
3
votes
1 answer

Include my own mb_string functions or use PHP's defaults?

For a public app - do you think it's a good idea to assume the mb_string extension is enabled on all servers (or almost all, like 95%)? Are there hosts out there that disable this extension?
Alex
  • 66,732
  • 177
  • 439
  • 641
3
votes
1 answer

mbstring Ubuntu 14.04 dependency package conflict

I am trying to install PHP mbstring module in my Ubuntu 14.04 machine. I've used "sudo apt-get -f install php7.0-mbstring" to install the module. I've added necessary source list in "/etc/apt/sources.list". When I run the above mbstring installation…
3
votes
0 answers

Compile mbstring statically into PHP

Is there a way to compile the PHP extension mbstring statically into PHP (PHP >= 7)? Something like ./configure [...] --enable-mbstring=static [...] && make?
devopsfun
  • 1,368
  • 2
  • 15
  • 37
3
votes
3 answers

Missing mbstring PHP extension when installing phpMyAdmin on Mac

PhpMyAdmin install errors Having some issues with installing phpMyAdmin. I would like to resolve the following issue, but don't have a clue where to start (except maybe php.ini?). Here's the error message. The mbstring PHP extension was not found…
user575228
  • 35
  • 1
  • 1
  • 3
3
votes
1 answer

Why do mbstring functions incorrectly identify ISO-8859 strings?

Despite listing each ISO-8859 character set as an individual encoding, the mbstring functions treat every ISO-8859 character set interchangeably. To drive the point home: $strings = [ 'English' => 'Ea vim decore sapientem repudiandae. Sea cu…
bosco
  • 232
  • 4
  • 13
3
votes
1 answer

Does mbstring normalize utf-8 strings?

I noticed that mb_convert_encoding always returns valid utf-8, which is great for cleaning up user input, but I wonder whether it will return a normalized form of utf-8 or whether I would have to do that manually after with the \Normalizer class?
user1115652
3
votes
3 answers

Cannot install mbstring php conflict

I am trying to install php-mbstring with php 5.6 and I get this error: Error: php56w-common conflicts with php-common-5.4.45-3.el6.remi.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles…
user1011332
  • 773
  • 12
  • 27