Cannot Create a keystore in elasticsearch 5.6.5

Hello,
I'm following the documentation on the official website of elastic. However, it gives me this error:
ERROR: String value must contain only ASCII
the steps i'm doing are the following:
bin/elasticsearch-keystore create
cat /etc/elasticsearch/elasticsearch.keystore | bin/elasticsearch-keystore add --stdin the.setting.name.to.set
P.S /etc/elasticsearch/elasticsearch.keystore the created file by the elasticsearch-keystore and its value inside is not ASCII
"�00=0!0sear+�+�6'�sR{ѣY��#���!Ƹ�K\�hC�`���@�g&�(��M�G"

cat /etc/elasticsearch/elasticsearch.keystore is wrong I believe. Why are you doing that?

@dadoonet in the documentation it says
cat /file/containing/setting/value | bin/elasticsearch-keystore add --stdin the.setting.name.to.set

Does /etc/elasticsearch/elasticsearch.keystore contains a value?

yes something like this
�00=0!0sear+�+�6'�sR{ѣY��#���!Ƹ�K\�hC�`���@�g&�(��M�G
generated by the first command

It's not a value. It's the keystore itself.

What are you trying to do? Which settings you want to add to the keystore?