# How to add documents with extended ASCII and non printable characters (Elastic Search)

**URL:** <https://discuss.elastic.co/t/how-to-add-documents-with-extended-ascii-and-non-printable-characters-elastic-search/77515>\
**Category:** Elasticsearch\
**Created:** [March 6, 2017, 2:25pm UTC](https://discuss.elastic.co/t/how-to-add-documents-with-extended-ascii-and-non-printable-characters-elastic-search/77515 "2017-03-06T14:25:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drkkumar](https://avatars.discourse-cdn.com/v4/letter/d/f6c823/32.png) [@drkkumar](https://discuss.elastic.co/u/drkkumar)\
**Post date:** [March 6, 2017, 2:25pm UTC](https://discuss.elastic.co/t/how-to-add-documents-with-extended-ascii-and-non-printable-characters-elastic-search/77515/1 "2017-03-06T14:25:31Z")

</div>

curl -XPUT '[http://localhost:9200/test/sample/1](http://localhost:9200/test/sample/1)' -d '{  
{  
"msg" : "¶¾è",  
}

It throws an exception  
{"error":{"root\_cause":[{"type":"json\_parse\_exception","reason":"json\_parse\_exception: Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: org.elasticsearch.common.io.stream.InputStreamStreamInput@a8c8d54; line: 2, column: 2]"}],"type":"mapper\_parsing\_exception","reason":"failed to parse","caused\_by":{"type":"json\_parse\_exception","reason":"json\_parse\_exception: Unexpected character ('{' (code 123)): was expecting either valid name character (for unquoted name) or double-quote (for quoted) to start field name\n at [Source: org.elasticsearch.common.io.stream.InputStreamStreamInput@a8c8d54; line: 2, column: 2]"}},"status":400}

Can someone please throw some light on this?

Thanks

---

<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:** [March 6, 2017, 10:59pm UTC](https://discuss.elastic.co/t/how-to-add-documents-with-extended-ascii-and-non-printable-characters-elastic-search/77515/2 "2017-03-06T22:59:23Z")

</div>

It must be UTF8 encoded.

---

<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:** [April 3, 2017, 10:59pm UTC](https://discuss.elastic.co/t/how-to-add-documents-with-extended-ascii-and-non-printable-characters-elastic-search/77515/3 "2017-04-03T22:59:29Z")

</div>

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