[Ttssh2-commit] [9123] スクリプトの使い方を追記

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2021年 1月 3日 (日) 15:35:28 JST


Revision: 9123
          https://osdn.net/projects/ttssh2/scm/svn/commits/9123
Author:   zmatsuo
Date:     2021-01-03 15:35:28 +0900 (Sun, 03 Jan 2021)
Log Message:
-----------
スクリプトの使い方を追記

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

Ticket Links:
------------
    https://osdn.net/projects/ttssh2/tracker/detail/40988

Modified Paths:
--------------
    branches/move_code_script/teraterm/teraterm/unicode/conv_combining.md
    branches/move_code_script/teraterm/teraterm/unicode/conv_combining.pl
    branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.md
    branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.pl

Added Paths:
-----------
    branches/move_code_script/teraterm/teraterm/unicode/rev_conv.pl

Removed Paths:
-------------
    branches/move_code_script/installer/rev_conv.pl

-------------- next part --------------
Deleted: branches/move_code_script/installer/rev_conv.pl
===================================================================
--- branches/move_code_script/installer/rev_conv.pl	2021-01-02 12:23:46 UTC (rev 9122)
+++ branches/move_code_script/installer/rev_conv.pl	2021-01-03 06:35:28 UTC (rev 9123)
@@ -1,34 +0,0 @@
-
-#
-# Shift_JIS\x82\xF0\x83L\x81[\x82Ƃ\xB5\x82ď\xB8\x8F\x87\x82ɏo\x97͂\xB7\x82\xE9
-#
-
-$file = 'SHIFTJIS_TXT.htm';
-
-&read_mapfile($file);
-exit();
-
-sub read_mapfile {
-	my($file) = @_;
-	my(%table, $val, $key);
-
-	open(FP, $file) || die "error"; 
-	while ($line = <FP>) {
-		if ($line =~ /^\#/) {next;}
-		if ($line =~ m+^\/+) {next;}
-		if ($line =~ m+^\<+) {next;}
-		$line =~ s/^\s+//;
-		@column = split(/\s+/, $line);
-
-		$val = int(hex($column[0])); # Unicode
-#		print "$column[0] -> $column[1] ($val)\n";
-		$table{$val} = hex($column[1]);
-#		printf "%d => %x\n", $val, $table{$val};
-	}
-	close(FP);
-
-	foreach $key (sort {$a <=> $b} keys %table) {
-		printf "	{ 0x%04X, 0x%04X },\n", $key, $table{$key};
-	}
-}
-

Modified: branches/move_code_script/teraterm/teraterm/unicode/conv_combining.md
===================================================================
--- branches/move_code_script/teraterm/teraterm/unicode/conv_combining.md	2021-01-02 12:23:46 UTC (rev 9122)
+++ branches/move_code_script/teraterm/teraterm/unicode/conv_combining.md	2021-01-03 06:35:28 UTC (rev 9123)
@@ -18,3 +18,11 @@
     - UNICODE DECOMPOSITION TABLE.htm
   - 移動
     - http://developer.apple.com/technotes/tn/tn1150table.html
+
+## 使い方
+
+```
+wget https://developer.apple.com/library/archive/technotes/tn/tn1150table.html
+mv tn1150table.html "UNICODE DECOMPOSITION TABLE.htm"
+perl conv_combining.pl > uni_combining.map
+```

Modified: branches/move_code_script/teraterm/teraterm/unicode/conv_combining.pl
===================================================================
--- branches/move_code_script/teraterm/teraterm/unicode/conv_combining.pl	2021-01-02 12:23:46 UTC (rev 9122)
+++ branches/move_code_script/teraterm/teraterm/unicode/conv_combining.pl	2021-01-03 06:35:28 UTC (rev 9123)
@@ -38,10 +38,10 @@
 	open(FP, $file) || die "error"; 
 	while ($line = <FP>) {
 #		print "$line\n";
-		if ($line =~ m|<P>0x(....)</P>|) {
+		if ($line =~ m|<P>0x(....)</p>|) {
 			$illegal = hex($1);
 		}
-		if ($line =~ m|<P>0x(....) 0x(....)</P>|) {
+		if ($line =~ m|<P>0x(....) 0x(....)</p>|) {
 			$first = hex($1);
 			$second = hex($2);
 

Modified: branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.md
===================================================================
--- branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.md	2021-01-02 12:23:46 UTC (rev 9122)
+++ branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.md	2021-01-03 06:35:28 UTC (rev 9123)
@@ -13,3 +13,10 @@
   - ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT
 - 作成当時
   - SHIFTJIS_TXT.htm
+
+## 使い方
+
+```
+wget ftp://ftp.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/JIS/SHIFTJIS.TXT
+perl conv_sjis.pl > uni2sjis.map
+```

Modified: branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.pl
===================================================================
--- branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.pl	2021-01-02 12:23:46 UTC (rev 9122)
+++ branches/move_code_script/teraterm/teraterm/unicode/conv_sjis.pl	2021-01-03 06:35:28 UTC (rev 9123)
@@ -3,7 +3,7 @@
 # Unicode\x82\xF0\x83L\x81[\x82Ƃ\xB5\x82ď\xB8\x8F\x87\x82Ƀ\\x81[\x83g\x82\xB7\x82\xE9
 #
 
-$file = 'SHIFTJIS_TXT.htm';
+$file = 'SHIFTJIS.TXT';
 
 &read_mapfile($file);
 exit();

Copied: branches/move_code_script/teraterm/teraterm/unicode/rev_conv.pl (from rev 9122, branches/move_code_script/installer/rev_conv.pl)
===================================================================
--- branches/move_code_script/teraterm/teraterm/unicode/rev_conv.pl	                        (rev 0)
+++ branches/move_code_script/teraterm/teraterm/unicode/rev_conv.pl	2021-01-03 06:35:28 UTC (rev 9123)
@@ -0,0 +1,34 @@
+
+#
+# Shift_JIS\x82\xF0\x83L\x81[\x82Ƃ\xB5\x82ď\xB8\x8F\x87\x82ɏo\x97͂\xB7\x82\xE9
+#
+
+$file = 'SHIFTJIS_TXT.htm';
+
+&read_mapfile($file);
+exit();
+
+sub read_mapfile {
+	my($file) = @_;
+	my(%table, $val, $key);
+
+	open(FP, $file) || die "error"; 
+	while ($line = <FP>) {
+		if ($line =~ /^\#/) {next;}
+		if ($line =~ m+^\/+) {next;}
+		if ($line =~ m+^\<+) {next;}
+		$line =~ s/^\s+//;
+		@column = split(/\s+/, $line);
+
+		$val = int(hex($column[0])); # Unicode
+#		print "$column[0] -> $column[1] ($val)\n";
+		$table{$val} = hex($column[1]);
+#		printf "%d => %x\n", $val, $table{$val};
+	}
+	close(FP);
+
+	foreach $key (sort {$a <=> $b} keys %table) {
+		printf "	{ 0x%04X, 0x%04X },\n", $key, $table{$key};
+	}
+}
+


Ttssh2-commit メーリングリストの案内
Back to archive index