Created
September 21, 2012 03:21
-
-
Save tmr111116/3759556 to your computer and use it in GitHub Desktop.
UnityでC#の新規作成ファイルをBOM付きUTF-8にするコマンド(Mac環境向け)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://d.hatena.ne.jp/nakamura001/20120824/1345832011 の「複数回実行するとBOMデータが実行しただけ追加されてしまうので必ず1回だけ実行する様に気を付けて下さい。」が気になったので書きなおした。 | |
ruby -e 'ARGV.each{|file|a=open(file).read().gsub(/\A(\xef\xbb\xbf)*/m,"\xef\xbb\xbf"*2);open(file,"w").write(a);}' /Applications/Unity/Unity.app/Contents/Resources/ScriptTemplates/81-C#\ Script-NewBehaviourScript.cs.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment