Encoding of str commands