Scanner always returns strings as UTF-8 for #rest and #scan.
Make sure all input has same encoding, to avoid mismatch problems.