unify string handling for rfc conversion