0
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 1 year has passed since last update.

macでUTF-8からShift_JISに変換出来ないとき

Last updated at Posted at 2022-10-21

csvをexcelで開くと文字化けしている

原因、excelはデフォルトでShift_JISに変換しているため。
excelで開くとエンコーディングされるので、
先にファイル形式をshift_jisにしてからデータを貼り付けると問題を回避できる。
テキストエディットで変換するような記事が多いが、以下のやり方が一番簡単かと思う

対応方法

  1. vscodeでcsvファイルを開く。
  2. データを切り取る
  3. ファイルの文字コードをshift.jisに変更する
  4. 切り取ったデータを貼り付ける
  5. 保存する
  6. 以上

参考

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?