LoginSignup
0
0

More than 1 year has passed since last update.

勉強メモ49_windowsコマンドを使用して文字コードUTF-8でデータありの新規のプロパティ-ファイル(sample5.properties)作成

Posted at

0 はじめに

大量のプロパティファイルを作成する必要があったため、サンプルデータ付きの文字コードUTF-8
のプロパティファイルを作成

1 取り急ぎ、下記のバッチを動かしたときに「sample5.properties」ファイルが作成されるが、一応開いたときに文字コードがUTF-8になっていることを確認

sample.bat
@echo off
@REM Shift_JIS
chcp 932
set HOGE=ほげ

echo ほげ>sample1.txt
echo %HOGE%>sample2.txt

@REM UTF-8
chcp 65001
set HOGEHOGE=ほげほげ

echo ほげ>sample3.txt
echo %HOGE%>sample4.txt
echo %HOGEHOGE%>sample5.txt
echo %HOGEHOGE%>sample5.properties
type nul > sample6.properties

pause

image.png
image.png
image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0