# Scandinavian letters from PostgreSQL

**URL:** https://discuss.elastic.co/t/scandinavian-letters-from-postgresql/144274
**Category:** Logstash
**Created:** [August 14, 2018, 4:00am UTC](https://discuss.elastic.co/t/scandinavian-letters-from-postgresql/144274 "2018-08-14T04:00:12Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MikkoLuhtasaari](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@MikkoLuhtasaari](https://discuss.elastic.co/u/MikkoLuhtasaari)
#### Post date: [August 14, 2018, 4:00am UTC](https://discuss.elastic.co/t/scandinavian-letters-from-postgresql/144274/1 "2018-08-14T04:00:12Z")

</div>

I'm trying to index data from PostgreSQL to Elasticsearch using Logstash. The database is encoded in UTF-8. Here's an example of data:

> nameöäå  
> First name with å  
> Second name with ä  
> Third name with ö

But when I'm trying to index the fields into Elasticsearch they come out as following:

> "nameÃ¶Ã¤Ã¥": "First name with å",  
> "nameÃ¶Ã¤Ã¥": "Second name with ä",  
> "nameÃ¶Ã¤Ã¥": "Second name with ä",

I know that this is an issue with encodings but can't figure out the root cause. The PostgreSQL database is encoded in UTF-8 and Logstash should also default to UTF-8. My PostgreSQL version is 9.5, JDBC driver version is 42.2.4, Elasticsearch version is oss:6.3.1 and Logstash version is oss:6.3.1. I'm running the stack via docker-compose.

Here is my Logstash configuration file:  
logstash.conf:  
` input {`  
` jdbc {`  
` jdbc_connection_string => "jdbc:postgresql://db:5432/mydb"`  
` jdbc_user => "username"`  
` jdbc_password => "password"`  
` jdbc_driver_library => "/logstash_dir/postgresql-42.2.4.jar"`  
` jdbc_driver_class => "org.postgresql.Driver"`  
` type => "company"`  
` statement => "SELECT * from company"`  
` }`  
`}`  
`output {`  
` elasticsearch {`  
` index => "%{type}"`  
` document_type => "%{type}"`  
` hosts => ["http://elasticsearch:9200"]`  
` }`  
`}`

---

<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: [September 11, 2018, 4:00am UTC](https://discuss.elastic.co/t/scandinavian-letters-from-postgresql/144274/2 "2018-09-11T04:00:21Z")

</div>

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