encoding undef replace to minus