[Ttssh2-commit] [8326] lngファイルの文字コード変換に失敗する場合があったので修正

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 10月 22日 (火) 00:31:02 JST


Revision: 8326
          https://osdn.net/projects/ttssh2/scm/svn/commits/8326
Author:   zmatsuo
Date:     2019-10-22 00:31:02 +0900 (Tue, 22 Oct 2019)
Log Message:
-----------
lngファイルの文字コード変換に失敗する場合があったので修正

- UTF16leのファイルを出力するときCRの変換が行われていなかった
- ファイルをバイナリモードで扱うように修正
- Ttssh2-devel 4318

Modified Paths:
--------------
    branches/unicode_buf/installer/utf8_to.pl

-------------- next part --------------
Modified: branches/unicode_buf/installer/utf8_to.pl
===================================================================
--- branches/unicode_buf/installer/utf8_to.pl	2019-10-21 15:30:35 UTC (rev 8325)
+++ branches/unicode_buf/installer/utf8_to.pl	2019-10-21 15:31:02 UTC (rev 8326)
@@ -4,8 +4,8 @@
 my $in = $ARGV[1];
 my $out = $ARGV[2];
 
-open(INP, "<:utf8", $in) or die("error :$! $in");
-open(OUT, ">:encoding($code)", $out) or die("error :$! $out");
+open(INP, "<:raw:utf8", $in) or die("error :$! $in");
+open(OUT, ">:raw:encoding($code)", $out) or die("error :$! $out");
 
 my $line = 1;
 while (<INP>) {


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