Hi all, my question is as follows:
If I use the code as below:
text = '中文' #Text is in Chinese, whereby text = 'chinese'
with open('file.txt','w', encoding = 'UTF-8') as f:
f.write(text)
f.close()
My file.txt on Windows notepad will show it as saved as UTF-8.
However, if the text above is changed to some values within ASCII range (English alphabets, numbers etc.), then it will save as ANSI.
I need the file to be saved as UTF-8 as the purpose of this file is some configuration file that might have international characters (For localization purpose).
Tyvm.