fix OST-316 by correctly encoding to ascii