Save file in STC and utf-8

I use STC with persian character but when use SaveFile() I get the empty file I forced use open a file in utf-8 encode and then use GetText() method to save file in it
are you see this problem too?

Do you think your problem is related to this?

SaveFile seems to save the text in the OS-specific encoding (in my case, sjis (cp932) in windows 10 JP).