P
P
pcdesign2015-11-02 11:48:51
Magento
pcdesign, 2015-11-02 11:48:51

How to deal with question mark in Magento?

467a765f8d744bcea0c15d6f1945260f.png
In the database, utf8_general_ci is everywhere.
Template file in utf8 format.
Where else can you look?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2015-11-02
@pcdesign

I can’t say specifically about magento, but you clearly have substr by utf string there. Replace with mb_substr.

O
Oleg Batishchev, 2015-11-03
@z0rg

It is best to cut to a space, and as they said above, this is all because of the multibyte encoding.

$text = "Текст который надо обрезать до пробела, очень большой текст бла бла бла";
$text = preg_replace("/^(.{30}[^\,\s]*[\,\s])(.+)$/ui","\\1",$text) ;
echo $text;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question