aboutsummaryrefslogtreecommitdiffstats
path: root/codepage
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-01-25 17:23:32 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-01-25 17:23:32 -0800
commit582645e269ee82d544ab8b8b913c8364f3178484 (patch)
tree52f2627071926f3c2162643a0f57c1387627e36e /codepage
parent4b533a0066a26b82c36d58af05c3bbeabf7e3b95 (diff)
downloadsyslinux.git-582645e269ee82d544ab8b8b913c8364f3178484.tar.gz
syslinux.git-582645e269ee82d544ab8b8b913c8364f3178484.tar.xz
syslinux.git-582645e269ee82d544ab8b8b913c8364f3178484.zip
Reorganize the codepage handling to allow ucs2 -> codepage conversion
Reorganize the codepage handling to make it easier to do ucs2 -> codepage conversion, this will be used for a future directory lister.
Diffstat (limited to 'codepage')
-rwxr-xr-xcodepage/cptable.pl5
1 files changed, 4 insertions, 1 deletions
diff --git a/codepage/cptable.pl b/codepage/cptable.pl
index c7e20023..05cfc3eb 100755
--- a/codepage/cptable.pl
+++ b/codepage/cptable.pl
@@ -118,6 +118,7 @@ for ($i = 0; $i < 256; $i++) {
# Unicode (longname) matching table.
# This only depends on the console codepage.
#
+$pp0 = ''; $pp1 = '';
for ($i = 0; $i < 256; $i++) {
if (!defined($ytab[$i])) {
$p0 = $p1 = 0xffff;
@@ -136,8 +137,10 @@ for ($i = 0; $i < 256; $i++) {
# Only the BMP is supported...
$p0 = 0xffff if ($p0 > 0xffff);
$p1 = 0xffff if ($p1 > 0xffff);
- print CPOUT pack("vv", $p0, $p1);
+ $pp0 .= pack("v", $p0);
+ $pp1 .= pack("v", $p1);
}
+print CPOUT $pp0, $pp1;
close (CPOUT);