I have posted recently a topic about a problem in the display of topic containing à letter.
I modify the function parse_bbc() in /source/subs.php
// The idea is, find words xx long, and then replace them with xx + space + more.
if (strlen($data) > $modSettings['fixLongWords'])
{
// This is done in a roundabout way because $breaker has "long words" :P.
$data = strtr($data, array($breaker => '< >', ' ' => "\xA0"));
$data = preg_replace(
'/(?<=[>;:!? \xA0\]()]|^)([\w\.]{' . $modSettings['fixLongWords'] . ',})/e',
"preg_replace('/(.{" . ($modSettings['fixLongWords'] - 1) . "})/', '\\\$1< >', '\$1')",
$data);
$data = strtr($data, array('< >' => $breaker, "\xA0" => ' '));
}
changing all occurencies of:
xA0
with
x00A0
Now all my à letter remain à also when the text is longer than $modSettings['fixLongWords']
P.S.
I don't know if this is valid for all. In my utf-8 forum work good.
Bye
Unfortunately, it's not working as expected. See following document:
http://us3.php.net/manual/en/language.constants.php (http://us3.php.net/manual/en/language.constants.php)
Your code means three characters, null char, 'A' and '0'. The bug is in the string literal which hardcoded '\xA0' in there. The right fix is to remove that character.
// This is done in a roundabout way because $breaker has "long words" :P.
$data = strtr($data, array($breaker => '< >', ' ' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
$data = preg_replace(
'~(?<=[>;:!? ' . ($context['utf8'] ? '\x{C2A0}' : '\xA0') . '\]()]|^)([\w\.]{' . $modSettings['fixLongWords'] . ',})~e' . ($context['utf8'] ? 'u' : ''),
"preg_replace('/(.{" . ($modSettings['fixLongWords'] - 1) . '})/' . ($context['utf8'] ? 'u' : '') . "', '\\\$1< >', '\$1')",
$data);
$data = strtr($data, array('< >' => $breaker, $context['utf8'] ? "\xC2\xA0" : "\xA0" => ' '));
I While the message send fatal error :'(
$data = strtr($data, array($breaker => '< >', ' ' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
Is there the mistake?
I don't see any parse error in the code you posted. Are you sure this change is even needed? This topic was started nearly a year ago and when I tested out posting long words with just "à" in them I didn't see any problems.
bendeki hata images hack eklemelerini kaldırınca çözüldü. popup url + pop up image duruyor. images hack entegrasyonunu nasıl çözerim bilmem ama