# How do I search for non-ASCII characters?

**URL:** https://discuss.elastic.co/t/how-do-i-search-for-non-ascii-characters/161852
**Category:** Elasticsearch
**Created:** [December 21, 2018, 1:37pm UTC](https://discuss.elastic.co/t/how-do-i-search-for-non-ascii-characters/161852 "2018-12-21T13:37:27Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![TimWard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timward/32/19574_2.png) [@TimWard](https://discuss.elastic.co/u/TimWard)
#### Post date: [December 21, 2018, 1:37pm UTC](https://discuss.elastic.co/t/how-do-i-search-for-non-ascii-characters/161852/1 "2018-12-21T13:37:27Z")

</div>

I've got a load of log data in Elasticsearch. Most of it is in ASCII, but very occasionally there's a non-ASCII character ... which breaks a downstream naive Python application.

What query can I use to find the documents that contain non-ASCII characters? - yes I'll need to fix the downstream code anyway, but it would be interesting to know what is generating non-ASCII log documents. Example: all I know about a document is that it contains a U+FFFD character - how do I search for that?

---

<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: [January 18, 2019, 1:37pm UTC](https://discuss.elastic.co/t/how-do-i-search-for-non-ascii-characters/161852/2 "2019-01-18T13:37:29Z")

</div>

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