xojo

How to replace these extended ascii codes?


I am opening up .txt files but when they are loaded on Xojo weird characters like these (’ , â€ک) show up.

I've tried DefineEncoding and ConvertEncoding but it still doesn't seem to work.

output.text = output.text.DefineEncoding(Encodings.WindowsANSI)

output.text = output.text.ConvertEncoding(Encodings.UTF8)


Solution

  • You may have to define the encoding already at time of loading, not afterwards, or you'll get UTF8 chara from loading that you will then mess up with your posted code. So, pass the encoding to the Read function or load the data as a binary file, not as a text file.