We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
こんにちは。Altseed2を利用させていただいております。 本日は日本語をログ出力した際に文字化けしたのですが、バグかもしれないのでお尋ねしたいと思いました。 普通にコンソール出力する際は文字化けしませんでした。 調査していただけると幸いです。
using Altseed2; using System; namespace Altseed2Tutorial { class Program { [STAThread] static void Main(string[] args) { // エンジンを初期化 var config = new Configuration(); config.ConsoleLoggingEnabled = true; config.FileLoggingEnabled = true; config.LogFileName = "Log.txt"; Engine.Initialize("Tutorial", 960, 720, config); // メインループ while (Engine.DoEvents()) { // エンジンを更新 Engine.Update(); if (Engine.Keyboard.GetKeyState(Key.Escape) == ButtonState.Push) { Engine.Log.Write(LogCategory.Engine, LogLevel.Critical, "テスト"); Engine.Log.Write(LogCategory.User, LogLevel.Error, "test2"); Console.WriteLine("テスト3"); } } // エンジンの終了処理を行う Engine.Terminate(); } } }
[2021-11-12 22:19:39.460] [Engine] [critical] 繝・せ繝・ [2021-11-12 22:19:39.464] [User] [error] test2 テスト3
The text was updated successfully, but these errors were encountered:
おそらくではありますが、コンソールの文字コードがshift-jsで、Altseed2の文字コードがutf-16であることに起因していると思われます。Windows Terminal等の新しい世代のものだったら正しく動く可能性があります。厄介な問題ではあるので、修正しない可能性もあります。
Sorry, something went wrong.
回答ありがとうございます。 ログのファイル出力機能も、ゲームを終了しないと出力がファイルに反映されないみたいなので、 自分で実装しようと思います。
No branches or pull requests
Describe the bug/概要
こんにちは。Altseed2を利用させていただいております。
本日は日本語をログ出力した際に文字化けしたのですが、バグかもしれないのでお尋ねしたいと思いました。
普通にコンソール出力する際は文字化けしませんでした。
調査していただけると幸いです。
Environment/環境
コード
実行結果
[2021-11-12 22:19:39.460] [Engine] [critical] 繝・せ繝・
[2021-11-12 22:19:39.464] [User] [error] test2
テスト3
The text was updated successfully, but these errors were encountered: