CSVを開くと文字化けする原因と直し方
この記事のポイント
- 今の文字コードを自動判定にする
- 読み取りの表示を確認する
- UTF-8やShift_JISに変換する
CSVの文字化けは、保存した文字コードと、開くソフトが想定する文字コードが違うために起きます。文字コードを変換する で、そろえられます。
手順
- ファイルを選び、「自動で判定」のままにする
- 下の「読み取った内容」で、文字が正しく見えるか確認する
- 必要な文字コードに変換して保存する
どの文字コードでも直らないときは、ファイルが壊れているか、文字ではないデータの可能性があります。
文字コードを変換する(文字化けを直す)を使う(無料)
あわせて使えるツール
- CSVとJSONを相互変換する:CSVとJSONを、すぐに相互変換します。
- CSVをExcelファイルにする:CSVを、Excelで開ける .xlsx ファイルにします。
- 文章の改行を消す・整える:PDFなどからコピーした文章の改行を整えます。
同じツールの、ほかの解説
Why a CSV Looks Garbled and How to Fix It
Key points
- Set the current encoding to auto-detect
- Check the preview
- Convert to UTF-8 or Shift_JIS
CSV files look garbled when the encoding they were saved in differs from the one the app expects. Convert Text Encoding lets you match them.
Steps
- Choose the file and keep "Auto-detect"
- Check in the preview that the characters look right
- Convert to the encoding you need and save
If no encoding fixes it, the file may be damaged or may not be text.
Use "Convert Text Encoding (Fix Garbled Text)" (free)
Tools that go well with this
- Convert CSV and JSON: Convert between CSV and JSON instantly.
- Convert CSV to Excel (.xlsx): Convert a CSV to an Excel (.xlsx) file.
- Remove and Tidy Line Breaks in Text: Tidy line breaks in text copied from PDFs and elsewhere.
More guides for this tool
- How to Convert a Text File's Encoding (Free, Works on a Phone)
- Opening a UTF-8 CSV in Excel (Convert to UTF-8 with BOM)
- Converting for Systems That Only Accept Shift_JIS
- How to Match Line Endings (CRLF and LF)
- How Encoding Auto-Detect Works and What to Do When It Fails
- Converting Encodings Without Uploading Your File