remove spaces when encoding hexBinary type