# String comparison with text from different encoding

**URL:** <https://forum.ansible.com/t/string-comparison-with-text-from-different-encoding/29150>\
**Category:** Ansible Project\
**Created:** [November 29, 2018, 11:40am UTC](https://forum.ansible.com/t/string-comparison-with-text-from-different-encoding/29150 "2018-11-29T11:40:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kcdenoy](https://avatars.discourse-cdn.com/v4/letter/k/ecb155/32.png) [@kcdenoy](https://forum.ansible.com/u/kcdenoy)\
**Post date:** [November 29, 2018, 11:40am UTC](https://forum.ansible.com/t/string-comparison-with-text-from-different-encoding/29150/1 "2018-11-29T11:40:08Z")

</div>

Hi all,

I wanted to know if such is possible?  
The environment has a host using 'euc-jp' as its encoding.

I'm aware that a result from a command task (e.g. shell: echo "hello world") is automatically converted to 'utf-8' encoding. Is it possible to test strings or similar that is using a different encoding?

Example,

sample.yml
