forked from php/php-src
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* PHP-8.4: NEWS for phpGH-17168 ext/gettext/config.m4: symlink en_US.UTF-8 test bits to en_US for musl ext/gettext/tests: fix libintl return values under musl ext/gettext/gettext.c: handle NULLs from bindtextdomain()
- Loading branch information
Showing
5 changed files
with
55 additions
and
13 deletions.
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
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
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 |
---|---|---|
|
@@ -15,14 +15,22 @@ gettext | |
} catch (ValueError $e) { | ||
echo $e->getMessage() . PHP_EOL; | ||
} | ||
var_dump(bind_textdomain_codeset('messages', "UTF-8")); | ||
|
||
// bind_textdomain_codeset() always returns false on musl | ||
// because musl only supports UTF-8. For more information: | ||
// | ||
// * https://github.com/php/doc-en/issues/4311, | ||
// * https://github.com/php/php-src/issues/17163 | ||
// | ||
$result = bind_textdomain_codeset('messages', "UTF-8"); | ||
var_dump($result === false || $result === "UTF-8"); | ||
|
||
echo "Done\n"; | ||
?> | ||
--EXPECT-- | ||
bind_textdomain_codeset(): Argument #1 ($domain) must not be empty | ||
bind_textdomain_codeset(): Argument #1 ($domain) must not be empty | ||
string(5) "UTF-8" | ||
bool(true) | ||
Done | ||
--CREDITS-- | ||
Florian Holzhauer [email protected] | ||
|