# Junk characters!

**URL:** <https://discuss.elastic.co/t/junk-characters/28092>\
**Category:** Logstash\
**Created:** [August 26, 2015, 10:53am UTC](https://discuss.elastic.co/t/junk-characters/28092 "2015-08-26T10:53:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sreeram](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sreeram](https://discuss.elastic.co/u/sreeram)\
**Post date:** [August 26, 2015, 10:53am UTC](https://discuss.elastic.co/t/junk-characters/28092/1 "2015-08-26T10:53:59Z")

</div>

I'm using ELK for centralized logging, in kibanna I'm seeing junk characters (for first 2 hits) as shown in image

 ![](https://us1.discourse-cdn.com/elastic/original/2X/e/e0f1f7e3dae9bda12e2bd753f6327c3ee9e7ab83.jpg)

**Log file encoding format is UCS-2**

**How to avoid this junk characters?!**

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [August 26, 2015, 11:03am UTC](https://discuss.elastic.co/t/junk-characters/28092/2 "2015-08-26T11:03:35Z")

</div>

Either the log files aren't actually UCS-2 or you haven't configured Logstash to assume UCS-2 or there's a bug in Logstash. Have you configured the plain codec to use UCS-2BE (or whatever matches your input) as the character set?

---

<div class="post-metadata">

**Author:** ![sreeram](https://avatars.discourse-cdn.com/v4/letter/s/b77776/32.png) [@sreeram](https://discuss.elastic.co/u/sreeram)\
**Post date:** [August 26, 2015, 11:19am UTC](https://discuss.elastic.co/t/junk-characters/28092/3 "2015-08-26T11:19:54Z")

</div>

I tried,

file {  
path =\> ["D:/platformDev/CenLogAnalysis/logpath/\*\*/\*.txt"]  
codec =\> plain { charset =\> "UCS-2BE" }  
sincedb\_path =\> ["D:/platformDev/CenLogAnalysis/since.db"]  
start\_position =\> "beginning"  
}

**Still facing the same issue..**

---

<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 6, 2017, 5:30am UTC](https://discuss.elastic.co/t/junk-characters/28092/4 "2017-07-06T05:30:50Z")

</div>


