OSDN Git Service

#23884 DTXMania本体とDTXCreatorの両者で、各種ファイルをUnicodeで書き出すようにした。
authoryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Tue, 30 Dec 2014 18:53:46 +0000 (18:53 +0000)
committeryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Tue, 30 Dec 2014 18:53:46 +0000 (18:53 +0000)
読み込み時は、まず文字コードの自動判別を行い、自動判別に失敗したときにはShift-JISとして読み込む。
このため、従来のデータを読み込んでも、問題なく動作するはず。

git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/trunk@799 16f42ceb-6dc6-49c8-ba94-f2d53467949d

DTXCreatorプロジェクト/コード/00.全体/Cメインフォーム.cs
DTXManiaプロジェクト/コード/スコア、曲/CScoreIni.cs
DTXManiaプロジェクト/コード/全体/CConfigIni.cs
DTXManiaプロジェクト/コード/全体/CDTXMania.cs
FDK17プロジェクト/コード/00.共通/CIniFile.cs
実行時フォルダ(DTXCreator)/DTXCreator.exe
実行時フォルダ(DTXCreator)/dll/FDK.dll
実行時フォルダ(DTXCreator)/ja-JP/DTXCreator.resources.dll
実行時フォルダ/DTXManiaGR.exe
実行時フォルダ/dll/FDK.dll

index 2fe76de..7c9a42a 100644 (file)
@@ -923,7 +923,7 @@ namespace DTXCreator
 \r
                        #region [ DTXファイルを出力する。]\r
                        //-----------------\r
-                       var sw = new StreamWriter( this.str作業フォルダ名 + this.strDTXファイル名, false, Encoding.GetEncoding( 932/*Shift-JIS*/ ) );\r
+                       var sw = new StreamWriter( this.str作業フォルダ名 + this.strDTXファイル名, false, Encoding.GetEncoding( "utf-16" ) );\r
                        new CDTX入出力( this ).tDTX出力( sw );\r
                        sw.Close();\r
                        //-----------------\r
index 1d99f3e..1c07bba 100644 (file)
@@ -1255,7 +1255,7 @@ namespace DTXMania
                        this.iniファイルのあるフォルダ名 = Path.GetDirectoryName( iniファイル名 );\r
                        this.iniファイル名 = Path.GetFileName( iniファイル名 );\r
 \r
-                       StreamWriter writer = new StreamWriter( iniファイル名, false, Encoding.GetEncoding( "Shift_JIS" ) );\r
+                       StreamWriter writer = new StreamWriter( iniファイル名, false, Encoding.GetEncoding( "utf-16" ) );\r
                        writer.WriteLine( "[File]" );\r
                        writer.WriteLine( "Title={0}", this.stファイル.Title );\r
                        writer.WriteLine( "Name={0}", this.stファイル.Name );\r
@@ -1569,7 +1569,7 @@ namespace DTXMania
                        builder.Append( cc.strDTXManiaのバージョン );\r
                        builder.Append( cc.最終更新日時 );\r
 \r
-                       byte[] bytes = Encoding.GetEncoding( "Shift_JIS" ).GetBytes( builder.ToString() );\r
+                       byte[] bytes = Encoding.GetEncoding( "utf-16" ).GetBytes( builder.ToString() );\r
                        StringBuilder builder2 = new StringBuilder(0x21);\r
                        {\r
                                MD5CryptoServiceProvider m = new MD5CryptoServiceProvider();\r
index e5ebe01..3f7362f 100644 (file)
@@ -1238,7 +1238,7 @@ namespace DTXMania
                }\r
                public void t書き出し( string iniファイル名 )\r
                {\r
-                       StreamWriter sw = new StreamWriter( iniファイル名, false, Encoding.GetEncoding( "Shift_JIS" ) );\r
+                       StreamWriter sw = new StreamWriter( iniファイル名, false, Encoding.GetEncoding( "utf-16" ) );\r
                        sw.WriteLine( ";-------------------" );\r
                        \r
                        #region [ System ]\r
index 34a4550..5dced6f 100644 (file)
@@ -1796,7 +1796,7 @@ for (int i = 0; i < 3; i++) {
                        {\r
                                try\r
                                {\r
-                                       Trace.Listeners.Add( new CTraceLogListener( new StreamWriter( System.IO.Path.Combine( strEXEのあるフォルダ, "DTXManiaLog.txt" ), false, Encoding.GetEncoding( "Shift_JIS" ) ) ) );\r
+                                       Trace.Listeners.Add( new CTraceLogListener( new StreamWriter( System.IO.Path.Combine( strEXEのあるフォルダ, "DTXManiaLog.txt" ), false, Encoding.GetEncoding( "utf-16" ) ) ) );\r
                                }\r
                                catch ( System.UnauthorizedAccessException )                    // #24481 2011.2.20 yyagi\r
                                {\r
index 421b0c8..7c07b97 100644 (file)
@@ -114,7 +114,7 @@ namespace FDK
                        StreamWriter sw = null;\r
                        try\r
                        {\r
-                               sw = new StreamWriter( this.strファイル名, false, Encoding.GetEncoding( "Shift_JIS" ) );   // オープン失敗の場合は例外発生。\r
+                               sw = new StreamWriter( this.strファイル名, false, Encoding.GetEncoding( "utf-16" ) );      // オープン失敗の場合は例外発生。\r
 \r
                                foreach( CSection section in this.Sections )\r
                                {\r
index c5f73a6..9fa9fae 100644 (file)
Binary files a/実行時フォルダ(DTXCreator)/DTXCreator.exe and b/実行時フォルダ(DTXCreator)/DTXCreator.exe differ
index 825858c..c5f3846 100644 (file)
Binary files a/実行時フォルダ(DTXCreator)/dll/FDK.dll and b/実行時フォルダ(DTXCreator)/dll/FDK.dll differ
index 390e1a8..dcc0425 100644 (file)
Binary files a/実行時フォルダ(DTXCreator)/ja-JP/DTXCreator.resources.dll and b/実行時フォルダ(DTXCreator)/ja-JP/DTXCreator.resources.dll differ
index e64220c..c2e9f1e 100644 (file)
Binary files a/実行時フォルダ/DTXManiaGR.exe and b/実行時フォルダ/DTXManiaGR.exe differ
index 825858c..3848ae5 100644 (file)
Binary files a/実行時フォルダ/dll/FDK.dll and b/実行時フォルダ/dll/FDK.dll differ