• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revisión9123 (tree)
Tiempo2021-01-03 15:35:28
Autorzmatsuo

Log Message

スクリプトの使い方を追記

- スクリプトが動作するよう修正
- rev_conv.pl を installer フォルダから移動- ticket #40988

Cambiar Resumen

Diferencia incremental

--- branches/move_code_script/installer/rev_conv.pl (revision 9122)
+++ branches/move_code_script/installer/rev_conv.pl (nonexistent)
@@ -1,34 +0,0 @@
1-
2-#
3-# Shift_JISをキーとして昇順に出力する
4-#
5-
6-$file = 'SHIFTJIS_TXT.htm';
7-
8-&read_mapfile($file);
9-exit();
10-
11-sub read_mapfile {
12- my($file) = @_;
13- my(%table, $val, $key);
14-
15- open(FP, $file) || die "error";
16- while ($line = <FP>) {
17- if ($line =~ /^\#/) {next;}
18- if ($line =~ m+^\/+) {next;}
19- if ($line =~ m+^\<+) {next;}
20- $line =~ s/^\s+//;
21- @column = split(/\s+/, $line);
22-
23- $val = int(hex($column[0])); # Unicode
24-# print "$column[0] -> $column[1] ($val)\n";
25- $table{$val} = hex($column[1]);
26-# printf "%d => %x\n", $val, $table{$val};
27- }
28- close(FP);
29-
30- foreach $key (sort {$a <=> $b} keys %table) {
31- printf " { 0x%04X, 0x%04X },\n", $key, $table{$key};
32- }
33-}
34-
--- branches/move_code_script/teraterm/teraterm/unicode/conv_combining.md (revision 9122)
+++ branches/move_code_script/teraterm/teraterm/unicode/conv_combining.md (revision 9123)
@@ -18,3 +18,11 @@
1818 - UNICODE DECOMPOSITION TABLE.htm
1919 - 移動
2020 - http://developer.apple.com/technotes/tn/tn1150table.html
21+
22+## 使い方
23+
24+```
25+wget https://developer.apple.com/library/archive/technotes/tn/tn1150table.html
26+mv tn1150table.html "UNICODE DECOMPOSITION TABLE.htm"
27+perl conv_combining.pl > uni_combining.map
28+```
--- branches/move_code_script/teraterm/teraterm/unicode/conv_combining.pl (revision 9122)
+++ branches/move_code_script/teraterm/teraterm/unicode/conv_combining.pl (revision 9123)
@@ -38,10 +38,10 @@
3838 open(FP, $file) || die "error";
3939 while ($line = <FP>) {
4040 # print "$line\n";
41- if ($line =~ m|<P>0x(....)</P>|) {
41+ if ($line =~ m|<P>0x(....)</p>|) {
4242 $illegal = hex($1);
4343 }
44- if ($line =~ m|<P>0x(....) 0x(....)</P>|) {
44+ if ($line =~ m|<P>0x(....) 0x(....)</p>|) {
4545 $first = hex($1);
4646 $second = hex($2);
4747
--- branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.md (revision 9122)
+++ branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.md (revision 9123)
@@ -13,3 +13,10 @@
1313 - ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT
1414 - 作成当時
1515 - SHIFTJIS_TXT.htm
16+
17+## 使い方
18+
19+```
20+wget ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT
21+perl conv_sjis.pl > uni2sjis.map
22+```
--- branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.pl (revision 9122)
+++ branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.pl (revision 9123)
@@ -3,7 +3,7 @@
33 # Unicodeをキーとして昇順にソートする
44 #
55
6-$file = 'SHIFTJIS_TXT.htm';
6+$file = 'SHIFTJIS.TXT';
77
88 &read_mapfile($file);
99 exit();
--- branches/move_code_script/teraterm/teraterm/unicode/rev_conv.pl (nonexistent)
+++ branches/move_code_script/teraterm/teraterm/unicode/rev_conv.pl (revision 9123)
@@ -0,0 +1,34 @@
1+
2+#
3+# Shift_JISをキーとして昇順に出力する
4+#
5+
6+$file = 'SHIFTJIS_TXT.htm';
7+
8+&read_mapfile($file);
9+exit();
10+
11+sub read_mapfile {
12+ my($file) = @_;
13+ my(%table, $val, $key);
14+
15+ open(FP, $file) || die "error";
16+ while ($line = <FP>) {
17+ if ($line =~ /^\#/) {next;}
18+ if ($line =~ m+^\/+) {next;}
19+ if ($line =~ m+^\<+) {next;}
20+ $line =~ s/^\s+//;
21+ @column = split(/\s+/, $line);
22+
23+ $val = int(hex($column[0])); # Unicode
24+# print "$column[0] -> $column[1] ($val)\n";
25+ $table{$val} = hex($column[1]);
26+# printf "%d => %x\n", $val, $table{$val};
27+ }
28+ close(FP);
29+
30+ foreach $key (sort {$a <=> $b} keys %table) {
31+ printf " { 0x%04X, 0x%04X },\n", $key, $table{$key};
32+ }
33+}
34+
Show on old repository browser