Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collator::getSortKey() was returning an unterminated string due the length given to RETURN_STRINGL being off by one.
- Loading branch information
1 parent
5d61e56
commit 51286bd
Showing
2 changed files
with
19 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--TEST-- | ||
Bug #62070: Collator::getSortKey() returns garbage | ||
--SKIPIF-- | ||
<?php | ||
if (!extension_loaded('intl')) | ||
die('skip intl extension not enabled'); | ||
--FILE-- | ||
<?php | ||
$s1 = 'Hello'; | ||
|
||
$coll = collator_create('en_US'); | ||
$res = collator_get_sort_key($coll, $s1); | ||
|
||
echo urlencode($res); | ||
--EXPECT-- | ||
5%2F%3D%3DC%01%09%01%8F%08 | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
cataphract
Author
Contributor
|
I think we have to stop putting collation keys into tests, they are not stable between ICU versions and this test fails for me on ICU 4.2.1.