php-src/ext/intl/tests/resourcebundle.inc
George Peter Banyard 04ab4d09be Add Intl resource bundle files for big-endian architecture.
Little and Big endian files have their own designated folder.
Both use the ASCII charset family.
We may want to add a big-endian/EBCDIC charset family resource bundle in the future.

The build script is currently left untouched as it seems to mostly be for Windows.
2020-04-14 15:30:01 +02:00

20 lines
512 B
PHP

<?php
// FIXME Improve Endian check when endian const gets added
// Check if platform is Big or Little endian
if (pack('S', 0xABCD) !== pack('v', 0xABCD)) {
$endian = 'be';
} else {
$endian = 'le';
}
define('BUNDLE', __DIR__ . '/_files/resourcebundle_' . $endian);
function debug( $res ) {
if (is_null( $res )) {
$ret = "NULL\n";
}
else {
$ret = print_r( $res, true ). "\n";
}
return $ret . sprintf( "%5d: %s\n", intl_get_error_code(), intl_get_error_message() );
}