3
1

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.

EPUBファイルがKindle上で文字化けするのを修正する

Last updated at Posted at 2022-11-08

背景

EPUB形式の本をダウンロードしてKindleに送信して読もうとしたところ、日本語部分が文字化けしていて読めません。Kindle Paperwhite端末でもAndroidのKindleアプリでも文字化けが発生しました。

対処法

結論

EPUBファイルの中にあるXHTMLファイルのmetaタグを以下のように修正しました。

<!-- 修正前 --> <meta charset="utf-8"/>
<!-- 修正後 --> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

手順

EPUBファイルを編集するためにSigilというソフトウェアをインストールしました。SigliでEPUBファイルを開くと次のような画面になります。
image.png
EPUB形式の電子書籍の本文はXHTMLで構成されていることがわかります。

metaタグを含む行を探して上記のように変更します。少しめんどくさいのですが、Textディレクトリに存在する全てのXHTMLファイルに対して修正を施せば完了です。

参考文献

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?