View Issue Details

IDProjectCategoryView StatusLast Update
0000434WackoWikiformatterpublic2017-08-31 09:36
Reporterwk Assigned Toadministrator  
PrioritynormalSeveritytextReproducibilityalways
Status resolvedResolutionfixed 
PlatformLinuxOSGentooOS Versionkernel 3.7.10
Product Version5.0.0 
Target Version5.5.0Fixed in Version5.5.0 
Summary0000434: Cyrillic letter encoding issue.
DescriptionЦ letter has is represented as \xd0\xa6 in UTF-8. But \xa6 byte is used as delimiter in wacko.php formatter. So when this letter (uppercase) is present on the page the page formatter cuts it.
Steps To Reproduce1. Create a page.
2. Type 'Ц'.
3. Submit.
Additional InformationTo avoid this I've changed delimiter to \xfe\xa6 as this sequence isn't valid UTF-8 character.
TagsNo tags attached.
Attached Files
wacko.php.patch (751 bytes)   
diff -r 3f5d9b605bf3 wacko/formatters/wacko.php
--- a/wacko/formatters/wacko.php	Sat Jan 12 12:35:40 2013 +0100
+++ b/wacko/formatters/wacko.php	Sat May 18 20:32:24 2013 +0300
@@ -20,12 +20,12 @@
 
 for ($i = 2; $i < count($texts); $i = $i + 2)
 {
-	$wtext = $wtext."\xa6".$texts[$i];
+	$wtext = $wtext."\xfe\xa6".$texts[$i];
 }
 
 $wtext	= preg_replace_callback($parser->MOREREGEXP, array(&$parser, 'wacko_middleprocess'), $wtext);
 $wtext	= preg_replace_callback($parser->LONGREGEXP, array(&$parser, 'wacko_callback'), $wtext);
-$wtexts	= explode("\xa6", $wtext);
+$wtexts	= explode("\xfe\xa6", $wtext);
 $text	= '';
 
 for ($i = 0; $i < count($wtexts); $i++)
@@ -70,4 +70,4 @@
 
 echo $text;
 
-?>
\ No newline at end of file
+?>
wacko.php.patch (751 bytes)   

Relationships

related to 0000216 resolvedadministrator UTF8 support 

Activities

administrator

2013-05-18 17:22

administrator   ~0000892

Last edited: 2013-05-18 17:24

With which PHP version do you have this issue? PHP 5.4?

Please attach a patch or diff file with your changes.

wk

2013-05-18 17:32

reporter   ~0000893

PHP/5.3.3 on server.
Also reproduced under PHP/5.5.0-pl2-gentoo on my desktop.

administrator

2013-05-18 19:43

administrator   ~0000894

Trying to reproduce the undesired behavior.
  http://wackowiki.sourceforge.net/doc/Users/WikiAdmin/Bug434 -> windows_1252
  http://wackowiki.sourceforge.net/unicode/Bug434 -> utf8 (experimental utf8 fork)

Your page encoding is windows_1252?
Can you attach a simple drop in text for reproduction.


BTW. WackoWiki will fail with PHP5.4 and up, see bug 0000422 (Fix is not backward compatible)

wk

2013-05-18 20:13

reporter   ~0000895

Last edited: 2013-05-20 12:13

Please find my test here http://wackowiki.sourceforge.net/doc/Users/webknjaz .
I use UTF-8.
P.S. For now I'm not going to use php 5.4 on production, so there's no need for that fix.
P.P.S. It seems we're using non-utf8 version upgraded from older one, because we have some modifications. However charset in lang file is set to UTF-8 and it works well with this patch.

administrator

2014-01-06 12:12

administrator   ~0000912

patch added - thanks

Issue History

Date Modified Username Field Change
2013-05-18 16:09 wk New Issue
2013-05-18 17:22 administrator Note Added: 0000892
2013-05-18 17:22 administrator Assigned To => administrator
2013-05-18 17:22 administrator Status new => acknowledged
2013-05-18 17:24 administrator Note Edited: 0000892
2013-05-18 17:32 wk Note Added: 0000893
2013-05-18 17:32 wk File Added: wacko.php.patch
2013-05-18 19:43 administrator Note Added: 0000894
2013-05-18 20:13 wk Note Added: 0000895
2013-05-20 12:13 wk Note Edited: 0000895
2014-01-06 12:12 administrator Note Added: 0000912
2014-01-06 12:12 administrator Status acknowledged => resolved
2014-01-06 12:12 administrator Resolution open => fixed
2014-01-06 12:12 administrator Fixed in Version => 5.5.0
2014-01-06 12:12 administrator Target Version => 5.5.0
2014-01-06 12:13 administrator Relationship added related to 0000216
2016-09-21 09:18 administrator Fixed in Version 5.5.0 => 5.5.rc2
2017-08-31 09:36 administrator Fixed in Version 5.5.rc2 => 5.5.0