[1.7.x] Use smart_text rather than naive forcing-to-unicode for state reading