# バニラからのインポートエラー: UTF-8 の無効なバイトシーケンス

**URL:** <https://meta.discourse.org/t/error-importing-from-vanilla-invalid-byte-sequence-in-utf-8/104320>\
**Category:** Migration\
**Created:** [2018 年 12 月 14 日午後 11:30 UTC](https://meta.discourse.org/t/error-importing-from-vanilla-invalid-byte-sequence-in-utf-8/104320 "2018-12-14T23:30:53Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dpkoch](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dpkoch/32/126908_2.png) [@dpkoch](https://meta.discourse.org/u/dpkoch)\
**Post date:** [2018 年 12 月 14 日午後 11:30 UTC](https://meta.discourse.org/t/error-importing-from-vanilla-invalid-byte-sequence-in-utf-8/104320/1 "2018-12-14T23:30:53Z")

</div>

Vanilla フォーラムからのインポートを、[こちら](https://meta.discourse.org/t/how-to-migrate-from-vanilla-to-discourse/27273) に掲載されている手順に従って行おうとしています。しかし、vanilla.rb のインポートスクリプトを実行すると、以下のエラーが発生します。

```plaintext
Loading existing groups...
Loading existing users...
Loading existing categories...
Loading existing posts...
Loading existing topics...
parsing file...
reading file...
Traceback (most recent call last):
	5: from script/import_scripts/vanilla.rb:254:in `<main>'
	4: from /var/www/discourse/script/import_scripts/base.rb:47:in `perform'
	3: from script/import_scripts/vanilla.rb:17:in `execute'
	2: from script/import_scripts/vanilla.rb:37:in `parse_file'
	1: from script/import_scripts/vanilla.rb:72:in `read_file'
script/import_scripts/vanilla.rb:72:in `gsub': invalid byte sequence in UTF-8 (ArgumentError)

```

[こちら](https://stackoverflow.com/questions/6115612/how-to-convert-an-entire-mysql-database-characterset-and-collation-to-utf-8) に記載されている手順に従って MySQL データベースの文字セットを UTF8 に変更し、その後ポータファイルを再エクスポートしてみましたが、問題は解決しませんでした。何か解決策はありますか？

---

_[View the full topic](https://meta.discourse.org/t/error-importing-from-vanilla-invalid-byte-sequence-in-utf-8/104320)._
