# Logstash Coding problem

**URL:** https://discuss.elastic.co/t/logstash-coding-problem/127717
**Category:** Logstash
**Created:** [April 12, 2018, 2:43am UTC](https://discuss.elastic.co/t/logstash-coding-problem/127717 "2018-04-12T02:43:51Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Blackcat308](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Blackcat308](https://discuss.elastic.co/u/Blackcat308)
#### Post date: [April 12, 2018, 2:43am UTC](https://discuss.elastic.co/t/logstash-coding-problem/127717/1 "2018-04-12T02:43:52Z")

</div>

Synchronized data from mysql to Elasticsearch After the Chinese data is garbled Configured in the logstash configuration file UTF-8 GBK, etc. Not OK Someone knows how to solve it?

Remarks Database encoding is UTF-8 ![BaiduShurufa_2018-4-12_10-42-38](https://us1.discourse-cdn.com/elastic/original/3X/f/5/f5e16dbcd31053d471f96880f2585a13d0048a57.png)

 ![BaiduShurufa_2018-4-12_10-42-55](https://us1.discourse-cdn.com/elastic/original/3X/d/f/df005e79c867e373677dddaf2d82804756f76a25.png)

---

<div class="post-metadata">

### Author: ![yaauie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yaauie/32/23363_2.png) [@yaauie](https://discuss.elastic.co/u/yaauie)
#### Post date: [April 12, 2018, 3:49am UTC](https://discuss.elastic.co/t/logstash-coding-problem/127717/2 "2018-04-12T03:49:44Z")

</div>

What did your pipeline configuration look like? Logstash favors UTF-8 wherever possible, and most codecs and inputs allow explicit configuration of charsets (e.g., the per-column charset configuration in the JDBC Input plugin).

When using a database like MySQL, there are typically several bits than can get screwy:

- the column
- the table
- the connection (this one often gets missed)

Can you share the schema?

---

<div class="post-metadata">

### Author: ![Blackcat308](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Blackcat308](https://discuss.elastic.co/u/Blackcat308)
#### Post date: [April 12, 2018, 6:25am UTC](https://discuss.elastic.co/t/logstash-coding-problem/127717/4 "2018-04-12T06:25:14Z")

</div>

Thank you for reminding me that the problem has been solved. I ignored the coding of the column. After reading your reply to me, I repeatedly thought about it. Suddenly I remembered the listed problems and the problem was solved. Thank you very much.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [May 10, 2018, 6:36am UTC](https://discuss.elastic.co/t/logstash-coding-problem/127717/5 "2018-05-10T06:36:58Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
