I am using almost the latest version of php (5.5.11) and here is the problem. When I use json_encode of the part of the string, it returns false. In the beginning I was using substr, but then I realized that this is totally wrong when dealing with…
So I'm having a problem where I believe what's happening is I'm receiving data that uses some unicode spaces and some ascii spaces, such that certain strings that appear the same are not equivalent, for example, "water resistant" != "water…
The mbstring PHP module has a strict_detection setting, documented here. Unfortunately, the manual is completely useless; it only says that this option "enables the strict encoding detection".
I did a few tests and could not find how any of the…
I have a problem with UTF-8 and mb_strtoupper.
mb_internal_encoding('UTF-8');
$guesstitlestring='Le Courrier de Sáint-Hyácinthe';
$encoding=mb_detect_encoding($guesstitlestring);
if ($encoding!=='UTF-8')…
I'm getting error
Call to undefined function FOS\UserBundle\Util\mb_convert_case() app_path/vendor/bundles/FOS/UserBundle/Util/Canonicalizer.php on line 18
It occurs when I try to load fixtures.
First step was to install mbstring.so ext, so I…
I would like to replace invalid UTF-8 chars with quotation marks (PHP 5.3.5).
So far I have this solution, but invalid characters are removed, instead of being replaced by '?'.
function replace_invalid_utf8($str)
{
return mb_convert_encoding($str,…
Is there a way to determine for sure the minimum number of bytes required by a character in a specific encoding? Like one of the encodings supported by the mbstring extension. The value will be 1 for UTF-8, 2 for UTF-16, etc.
I don't want to obtain…
For some reason, when running mb_convert_encoding in phpunit, I am getting unexpected results. For example doing the following:
var_dump( mb_convert_encoding( utf8_decode( 'ö' ), 'UTF-8' ) === 'ö' )
The above returns bool (true) under PHP-FPM, and…
i just started dabbling in php and i'm afraid i need some help to figure out how to manipulate utf-8 strings.
I'm working in ubuntu 11.10 x86, php version 5.3.6-13ubuntu3.2. I have a utf-8 encoded file (vim :set encoding confirms this) which i then…
My website is fully converted to use utf-8, (mysql, http headers, PHP mb_string etc).
Im doing some penetration testing and trying to POST invalid utf to one of the scripts (using BurpSuite).
But when I post the invalid utf, an just hex-dump the…
I am trying to do a composer install ..., but getting an error of requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system. I am using Apache (Cpanel) and PHP 5.6.
Below are the ways I am trying to fix the…
I am new to docker and I'm trying to set it up in order to run with Laravel 5.1. I am currently getting the following error
Call to undefined function Illuminate\Foundation\Bootstrap\mb_internal_encoding() in…
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…
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…
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 =…