title: How to check in linux shell encoding of string already generated by Python script
body: <p>I run a Python script, that generates a string and then execute a shell script using that string.
  I want to check the encoding of that string using linux shell but without writing that string in file (disk operations runs slowly).
  Is it possible to check an encoding of string in Linux (Ubuntu) using only RAM?
  Something like:</p>
  
  <blockquote>
    <p>check-encoding 'My string with random encoding'</p>
  </blockquote>
  
  <p>Python check encoding script is slow too.</p>