encoding workaround