From: SourceForge.net <no...@so...> - 2009-12-27 15:18:23
|
Bugs item #2921878, was opened at 2009-12-27 15:11 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=547455&aid=2921878&group_id=76550 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Web tester Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Marcus Baker (lastcraft) Summary: and UTF-8 encoding Initial Comment: "assertText()" with between Cyrillic symbols symbol failed on Windows (but worked on Linux). Error message shows a broken string with malformed UTF-8 chars. Problem code (I downloaded project trunk, because 1.0.1 version performs identically bad): class SimplePage { static function normalise($html) { //Line 538: $text = preg_replace('#\s+#', ' ', $text); 1) I added modifier to '#\s+#u' as quick fix for my problem. But class TestOfLiveBrowser extends UnitTestCase { function testRelativeEncodedLinkFollowing() { now fails. So the problem with whitespace in different charsets is deeper. There are other places in code where string operations nor binary safe, nor charset-aware. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2009-12-27 15:18 Message: $text = preg_replace('#[\040\n\r\t]+#', ' ', $text); is a quick fix to pass tests ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=547455&aid=2921878&group_id=76550 |