MT#7803 Fix UTF8 handling in invoice generation

(cherry picked from commit cbce5d0795362fbccb2d7ff3c697736d00bb2c2b)