# Unicode whitespace in configuration files

**URL:** <https://discuss.elastic.co/t/unicode-whitespace-in-configuration-files/290651>\
**Category:** Logstash\
**Created:** [December 1, 2021, 11:03am UTC](https://discuss.elastic.co/t/unicode-whitespace-in-configuration-files/290651 "2021-12-01T11:03:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmb/32/14312_2.png) [@jmb](https://discuss.elastic.co/u/jmb)\
**Post date:** [December 1, 2021, 11:03am UTC](https://discuss.elastic.co/t/unicode-whitespace-in-configuration-files/290651/1 "2021-12-01T11:03:19Z")

</div>

Is Logstash expected to handle Unicode (UTF-8) in its configuration files?  
I found an issue today where a pipeline (actually, an Elasticsearch mapping template file) which looks perfectly good fails to load because some edit process resulted in it being formatted with UTF-8 whitespace characters (specifically `C2 A0`, the non-breaking space `00A0`).

This is of course an easy fix (and "don't do that") but not obvious to diagnose, and it seems that a NBS should be a perfectly valid whitespace character.

---

<div class="post-metadata">

**Author:** ![jmb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jmb/32/14312_2.png) [@jmb](https://discuss.elastic.co/u/jmb)\
**Post date:** [December 1, 2021, 11:17am UTC](https://discuss.elastic.co/t/unicode-whitespace-in-configuration-files/290651/2 "2021-12-01T11:17:57Z")

</div>

Well, I think I can probably answer my own question, for the benefit of others - according to the spec, a specific list of whitespace characters are accepted:

> Whitespace is any sequence of one or more of the following code points: character tabulation (U+0009), line feed (U+000A), carriage return (U+000D), and space (U+0020).

> **[ECMA-404\_2nd\_edition\_december\_2017.pdf](https://www.ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf)**

I imagine that implementations depart from the standard, but it's fair game if they reject other characters.

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [December 1, 2021, 7:21pm UTC](https://discuss.elastic.co/t/unicode-whitespace-in-configuration-files/290651/3 "2021-12-01T19:21:28Z")

</div>

> [@jmb](#):
>
> Is Logstash expected to handle Unicode (UTF-8) in its configuration files?

In general, no.

---

<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:** [December 29, 2021, 7:21pm UTC](https://discuss.elastic.co/t/unicode-whitespace-in-configuration-files/290651/4 "2021-12-29T19:21:38Z")

</div>

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