How to change AMPL IDE encoding to UTF-8?

I would like to use the .mod and .run files both in the AMPL IDE but also in other applications, like git-versioning tools or rst-documentation. For these other applications, UTF-8 is usually the default encoding. The AMPL IDE, however, uses win-1252 encoding and does not display all characters in the UTF-8 files correctly (e.g., ä, ö, ü, ß in the comments and docstrings).
Is it possible make the AMPL IDE use UTF-8 encoding?
It would be a great benefit for the integration with other applications.


To run AMPL IDE in Windows with utf-8 encoding do the following:

In the same folder where you have amplide.exe you will have a file named amplide.ini. Open amplide.ini with a text editor, like Notepad++ and add the line


at the end of the file.
Save and close the amplide.ini file.

When you restart AMPL IDE it will work in utf-8 as required.

Note: This had been answered on our previous forum on Google Groups by @Nicolau_Santos and I am just copying the answer here.


Thanks to both of you!

1 Like