[core] Fix a unicode warning and a potential problem with message splitting