Fixing illegal characters in readstruct and str2latex