cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
lala
Level IX

When JMP’s system setting is Charset("utf-8"), how can a variable be automatically saved as a txt file in Charset("gb2312") format?

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!
截图.png

2 REPLIES 2
Craige_Hales
Super User

Re: When JMP’s system setting is Charset("utf-8"), how can a variable be automatically saved as a txt file in Charset("gb2312") format?

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 

Craige
lala
Level IX

Re: When JMP’s system setting is Charset("utf-8"), how can a variable be automatically saved as a txt file in Charset("gb2312") format?

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" ) );

Recommended Articles