COMPAT: unicode compat issue fix (GH4854)

closes #4854