1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

文字コード関連のLinuxコマンド

Posted at

この記事は

  • タイトル通りです。
  • ググればわかることしか書いてません。かんぜんに個人メモです。

自己紹介

Java(Spring Boot)のWebアプリ開発を主にやってます。

コマンド

改行の有無を確認

od -c hoge.dat

改行を除去

tr -d '\n' < in.dat > out.dat

文字コードを確認

file -i hoge.txt

iconvで対応する文字コード一覧の表示

iconv -l

iconvで文字コード変換

  • ASCIIからEBCDICに変換
cat file_s.txt | iconv --from-code=ASCII-US --to-code=IBM930 > out.txt

参考

さいごに

以上です!

1
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?