A regular variable string shows a coder=0, but a UTF8 string from a file shows coder=1 , this makes impossible to work with regular expressions as there should be both coders=0 (I guess so). Is there a way to transform a string from one coder to another?