# UCS-2LE encoding not harvested

**URL:** <https://discuss.elastic.co/t/ucs-2le-encoding-not-harvested/97081>\
**Category:** Beats\
**Created:** [August 15, 2017, 9:23am UTC](https://discuss.elastic.co/t/ucs-2le-encoding-not-harvested/97081 "2017-08-15T09:23:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bterhorst](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bterhorst](https://discuss.elastic.co/u/bterhorst)\
**Post date:** [August 15, 2017, 9:23am UTC](https://discuss.elastic.co/t/ucs-2le-encoding-not-harvested/97081/1 "2017-08-15T09:23:54Z")

</div>

Hi,

I have a log file with with ucs-2 little endian encoding.  
For some reason these log file are not harversted by Filebeat if no encoding is configured.  
When I have tried to configure the follwoing encoding entries none seem to work:  
`encoding: UCS-2LE`  
`encoding: UCS-2BE`

I get the following error on startup: `Exiting: error loading states for prospector 2817249587859242041: unknown encoding('UCS-2BE')`

Regards benny

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [August 15, 2017, 7:51pm UTC](https://discuss.elastic.co/t/ucs-2le-encoding-not-harvested/97081/2 "2017-08-15T19:51:20Z")

</div>

Try utf16 instead of UCS-2. I'm not sure the decoding libs do define UCS-2, but UTF-16 is definitely supported.

---

<div class="post-metadata">

**Author:** ![bterhorst](https://avatars.discourse-cdn.com/v4/letter/b/c57346/32.png) [@bterhorst](https://discuss.elastic.co/u/bterhorst)\
**Post date:** [August 16, 2017, 7:10am UTC](https://discuss.elastic.co/t/ucs-2le-encoding-not-harvested/97081/3 "2017-08-16T07:10:53Z")

</div>

Hi Steffen,

Thanks for the reply.  
That seems to work as well.

Regards benny

---

<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 5, 2017, 9:24am UTC](https://discuss.elastic.co/t/ucs-2le-encoding-not-harvested/97081/4 "2017-09-05T09:24:09Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
