correctly handle non-ASCII chars in job XML on the client side

Based on a patch contributed by Martin Kyral.

Bug: 1014623
Change-Id: I66409922cbc8a6e15dd2c5b03f487eedc2fcfcae