How to export text with different encoded formats?

Hi. I’m beginner and I learning Python from Blender default templates. It has script which can export .txt, but with UTF-8 Encoding. So which encoding formats it can export? Write short:(…, encoding='utf-8).Thanks,Muslim.

Not sure what you’re asking, the most common formats are ascii, utf-8 and utf-8-sig.

I mean in code wrote:encoding=‘utf-8’.How to change it to ASNSI, ASCII or UTF-7 encoding format? I tried as:encoding=‘ansi’ and encoding=‘ascii’, but it didn’t work. Thanks,Muslim.

“ascii” and “utf-7” work just fine, but there is no ansi encoding.

Yes, it works now. But yes, ansi don’t working. Thanks.