X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdata%2Fsys-file-encoding.pl;h=95860d0e5bf3729fa4f55bd8c70390aa14e6ef09;hb=c8972f8c7c079984cc1986db8755e838f4050f9d;hp=4364b315188dbb0cf1cc5e29a6285bbe82a8f95d;hpb=302635bb8fa9b61e9646dcd49574a2dedcafd3de;p=pspp
diff --git a/src/data/sys-file-encoding.pl b/src/data/sys-file-encoding.pl
index 4364b31518..95860d0e5b 100755
--- a/src/data/sys-file-encoding.pl
+++ b/src/data/sys-file-encoding.pl
@@ -1,5 +1,5 @@
#! /usr/bin/perl
-# Copyright (C) 2020 Free Software Foundation
+# Copyright (C) 2020, 2021Free Software Foundation
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,24 +14,22 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
-
use strict;
use warnings;
-if (-t 0 || @ARGV) {
- print < sys-file-encoding.c
+usage: $0 CONVRTRS-TXT > sys-file-encoding.c
-To regenerate the encoding data, get the latest ICU encoding data from:
-http://source.icu-project.org/repos/icu/icu/trunk/source/data/mappings/convrtrs.txt
-then convert it with this script using the command above.
+To update the encoding data, get the latest ICU encoding data from:
+https://raw.githubusercontent.com/unicode-org/icu/main/icu4c/source/data/mappings/convrtrs.txt
EOF
exit (@ARGV && $ARGV[0] eq '--help' ? 0 : 1);
}
-open (CONVERTERS, '<', 'convrtrs.txt')
- or die "convrtrs.txt: open failed ($!)\n";
+open (CONVERTERS, '<', $ARGV[0])
+ or die "$ARGV[0]: open failed ($!)\n";
our $WINDOWS = 3; # Windows code pages.
our $IBM = 2; # IBM code pages.