Is changing the system setting to Charset("gb2312") the only way to save a variable as a txt file in Charset("gb2312") format?
On a 64-bit Simplified Chinese Windows 11 system.Thanks!
Yes, except I think there is an exception if a file is opened in the jsl editor from a gb2312 encoded file. Saving that editor window back to the *same* file might use the original file's charset. I think savetextfile() also has a charset parameter, you might search the scripting index ... I think there might be another function that uses an explicit charset.
edit: Only loadTextFile() and open() have the charset option, for reading. Wish list here: charset for saveTextFile
Thanks Experts!
Preference( Open Text File Charset( "gb2312" ) ); Preference( Save Text Files as Unicode( 0 ) ); Save Text File( 径1, 新文); Preference( Open Text File Charset( "utf-8" ) );