Skip to content

Commit 04ab4d0

Browse files
committed
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.
1 parent 1f48fee commit 04ab4d0

File tree

8 files changed

+10
-1
lines changed

8 files changed

+10
-1
lines changed
384 Bytes
Binary file not shown.
Binary file not shown.
400 Bytes
Binary file not shown.

ext/intl/tests/resourcebundle.build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
// FIXME Add handling for big endian archs
23
// THIS SCRIPT WILL REBUILD ResourceBundle bundles from source files
34

45
// DEFINE YOUR ICU TOOLS PATH HERE

ext/intl/tests/resourcebundle.inc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?php
2-
define('BUNDLE', dirname(__FILE__)."/_files/resourcebundle");
2+
// FIXME Improve Endian check when endian const gets added
3+
// Check if platform is Big or Little endian
4+
if (pack('S', 0xABCD) !== pack('v', 0xABCD)) {
5+
$endian = 'be';
6+
} else {
7+
$endian = 'le';
8+
}
9+
10+
define('BUNDLE', __DIR__ . '/_files/resourcebundle_' . $endian);
311

412
function debug( $res ) {
513
if (is_null( $res )) {

0 commit comments

Comments
 (0)