# Problem with accents

**URL:** <https://discuss.elastic.co/t/problem-with-accents/185565>\
**Category:** Elasticsearch\
**Created:** [June 13, 2019, 7:53am UTC](https://discuss.elastic.co/t/problem-with-accents/185565 "2019-06-13T07:53:15Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![soufiane1](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@soufiane1](https://discuss.elastic.co/u/soufiane1)\
**Post date:** [June 13, 2019, 7:53am UTC](https://discuss.elastic.co/t/problem-with-accents/185565/1 "2019-06-13T07:53:15Z")

</div>

Hello everyone,

I am trying to load data from a csv file to elasticsearch, but I can't get the accents "é",  
I get \xE0 for "à", there is some solution to solve this ?

Here is my config, and the accents exist in the column ["Libellé évènement"

###############################################################################################################

input  
{  
file  
{  
path =\> "C:/Users/BEKRISO/KIBANA7.0.1/INPUT/9r\_piste\_audit.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "C:/Users/BEKRISO/KIBANA7.0.1/sincedb"  
}  
}

############################################################################################################################

filter  
{  
csv  
{  
separator =\> ","

```
	columns => ["Date et heure","Utilisateur","Code","Libelle evenement","Code retour","Application","Code site","Objet Start","Usage cache","Valeur avant modif","Valeur apres modif"]
}

	
mutate{

	convert => { 
		
		"Date et heure" => "string"
		"Utilisateur" => "string" 
		"Code" => "integer" 
		"Libellé évènement" => "string" 
		"Code retour" => "integer" 
		"Application" => "string" 
		"Code site" => "integer" 
		"Objet Start" => "string" 
		"Usage cache" => "string" 						
		"Valeur avant modif" => "string" 
		"Valeur après modif" => "string"	
	
	}
	
	#Gestion des accents
	rename => { "Libelle evenement" => "Libellé évènement"  
				"Valeur apres modif" => "Valeur après modif" }
					

}

date { match => ["Date et heure", "dd/MM/YY HH:mm"] }

```

}

##############################################################################################################################

output  
{  
elasticsearch  
{  
hosts =\> "cas0000658713:9200"  
index =\> "monbeaunode\_1"  
}

stdout { codec =\> rubydebug }

}  
##############################################"

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 13, 2019, 9:21am UTC](https://discuss.elastic.co/t/problem-with-accents/185565/2 "2019-06-13T09:21:01Z")

</div>

You need to make sure that your content is encoded with UTF8 and not another encoding.

---

<div class="post-metadata">

**Author:** ![soufiane1](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@soufiane1](https://discuss.elastic.co/u/soufiane1)\
**Post date:** [June 13, 2019, 11:52am UTC](https://discuss.elastic.co/t/problem-with-accents/185565/3 "2019-06-13T11:52:41Z")

</div>

thank you for your response, I tried the following config but still have the same problem :

###############################################################################################################

input  
{  
file  
{  
path =\> "C:/Users/BEKRISO/KIBANA7.0.1/INPUT/9r\_piste\_audit.csv"  
start\_position =\> "beginning"  
sincedb\_path =\> "C:/Users/BEKRISO/KIBANA7.0.1/sincedb"  
}  
stdin  
{  
codec =\> plain { charset=\>"UTF-8" }  
}  
}

############################################################################################################################

filter  
{  
csv  
{  
separator =\> ","

```
	columns => ["Date et heure","Utilisateur","Code","Libelle evenement","Code retour","Application","Code site","Objet Start","Usage cache","Valeur avant modif","Valeur apres modif"]
}

	
mutate{

	convert => { 
		
		"Date et heure" => "string"
		"Utilisateur" => "string" 
		"Code" => "integer" 
		"Libellé évènement" => "string" 
		"Code retour" => "integer" 
		"Application" => "string" 
		"Code site" => "integer" 
		"Objet Start" => "string" 
		"Usage cache" => "string" 						
		"Valeur avant modif" => "string" 
		"Valeur après modif" => "string"	
	
	}
	
	#Gestion des accents
	rename => { "Libelle evenement" => "Libellé évènement"  
				"Valeur apres modif" => "Valeur après modif" }
					

}

date { match => ["Date et heure", "dd/MM/YY HH:mm"] }

```

}

##############################################################################################################################

output  
{  
elasticsearch  
{  
hosts =\> "cas0000658713:9200"  
index =\> "monbeaunode\_1"  
}

stdout { codec =\> rubydebug }

}

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 13, 2019, 2:40pm UTC](https://discuss.elastic.co/t/problem-with-accents/185565/4 "2019-06-13T14:40:10Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.  
Please update your post.

I meant that the CSV file should be in UTF8. If not, change the codec to the encoding you're using.

---

<div class="post-metadata">

**Author:** ![soufiane1](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@soufiane1](https://discuss.elastic.co/u/soufiane1)\
**Post date:** [June 17, 2019, 3:06pm UTC](https://discuss.elastic.co/t/problem-with-accents/185565/6 "2019-06-17T15:06:43Z")

</div>

My csv file is in UTF-8 and I also made the UTF-8 codec, but still have the same error,  
Here is my config code :

```
input
{
	file
	{
		path => "C:/Users/BEKRISO/KIBANA7.0.1/INPUT/9r_piste_audit.csv"
		start_position => "beginning"
		sincedb_path => "C:/Users/BEKRISO/KIBANA7.0.1/sincedb"
		codec => plain { charset => "UTF-8" }
	}
}

filter
{
	csv
	{
		separator => ","
		
		columns => ["Date et heure","Utilisateur","Code","Libelle evenement","Code retour","Application","Code site","Objet Start","Usage cache","Valeur avant modif","Valeur apres modif"]
	}

		
	mutate{
	
		convert => { 
			
			"Date et heure" => "string"
			"Utilisateur" => "string" 
			"Code" => "integer" 
			"Libellé évènement" => "string" 
			"Code retour" => "integer" 
			"Application" => "string" 
			"Code site" => "integer" 
			"Objet Start" => "string" 
			"Usage cache" => "string" 						
			"Valeur avant modif" => "string" 
			"Valeur après modif" => "string"	
		
		}
		
		#Gestion des accents
		rename => { "Libelle evenement" => "Libellé évènement"  
					"Valeur apres modif" => "Valeur après modif" }
						
	
	}
	
	date { match => ["Date et heure", "dd/MM/YY HH:mm"] }

				
}

output
{
	elasticsearch
	{
		hosts => "cas0000658713:9200"
		index => "monbeaunode_1"
	}
	
stdout { codec => rubydebug }

}
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 17, 2019, 3:20pm UTC](https://discuss.elastic.co/t/problem-with-accents/185565/7 "2019-06-17T15:20:19Z")

</div>

Could you share your CSV file somewhere?

---

<div class="post-metadata">

**Author:** ![soufiane1](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@soufiane1](https://discuss.elastic.co/u/soufiane1)\
**Post date:** [June 18, 2019, 8:43am UTC](https://discuss.elastic.co/t/problem-with-accents/185565/8 "2019-06-18T08:43:51Z")

</div>

Here is some lines of my csv file :

```
   Date et heure,Utilisateur,Code,Libellé évènement,Code retour,Application,Code site,Objet Start,Usage cache,Valeur avant modif ,Valeur après modif
    17/06/2019 07:37,1,Appel à la passerelle par une application cliente,00,9R,0990,TA-NM252-0,NON,,
    17/06/2019 06:00,1,Appel à la passerelle par une application cliente,00,TM,0990,TA-KVNIVITG-0,OUI,,
    17/06/2019 03:00,1,Appel à la passerelle par une application cliente,00,KV_WKW,0990,TA-KVNIVITG-0,NON,,
    16/06/2019 06:00,1,Appel à la passerelle par une application cliente,00,TM,0990,TA-KVNIVITG-0,NON,,
```

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2019, 8:56am UTC](https://discuss.elastic.co/t/problem-with-accents/185565/9 "2019-06-18T08:56:43Z")

</div>

Sure but can you share the source file (`C:/Users/BEKRISO/KIBANA7.0.1/INPUT/9r_piste_audit.csv`) that you are using? Not a copy and paste.

---

<div class="post-metadata">

**Author:** ![soufiane1](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@soufiane1](https://discuss.elastic.co/u/soufiane1)\
**Post date:** [June 18, 2019, 9:08am UTC](https://discuss.elastic.co/t/problem-with-accents/185565/10 "2019-06-18T09:08:38Z")

</div>

I can't share it, the only extensions possible to share are jpeg, jpg, png, gif

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2019, 10:13am UTC](https://discuss.elastic.co/t/problem-with-accents/185565/11 "2019-06-18T10:13:03Z")

</div>

Try here: [https://filebin.ca/](https://filebin.ca/)

---

<div class="post-metadata">

**Author:** ![soufiane1](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@soufiane1](https://discuss.elastic.co/u/soufiane1)\
**Post date:** [June 18, 2019, 12:51pm UTC](https://discuss.elastic.co/t/problem-with-accents/185565/12 "2019-06-18T12:51:54Z")

</div>

[https://filebin.ca/4l1iz64QbIS7/9r\_piste\_audit.csv](https://filebin.ca/4l1iz64QbIS7/9r_piste_audit.csv)

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [June 18, 2019, 1:31pm UTC](https://discuss.elastic.co/t/problem-with-accents/185565/13 "2019-06-18T13:31:21Z")

</div>

Here is the content when you read it with `UTF-8` encoding:

```auto
Date et heure,Utilisateur,Code,Libell? ?v?nement,Code retour,Application,Code site,Objet Start,Usage cache,Valeur avant modif ,Valeur apr?s modif
17/06/2019 07:37,1,Appel ? la passerelle par une application cliente,00,9R,0990,TA-NM252-0,NON,,
17/06/2019 06:00,1,Appel ? la passerelle par une application cliente,00,TM,0990,TA-KVNIVITG-0,OUI,,

```

So you file is not encoded in UTF-8.  
I read it as `ISO-8859-1` and saved it as `UTF8`. It's now this file: [https://filebin.ca/4l1w3cBnDMd3/9r\_piste\_audit.csv](https://filebin.ca/4l1w3cBnDMd3/9r_piste_audit.csv)

---

<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:** [July 16, 2019, 1:31pm UTC](https://discuss.elastic.co/t/problem-with-accents/185565/14 "2019-07-16T13:31:23Z")

</div>

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