Code pages are not often a consideration for traditional COBOL application development. However, they require attention in the advanced system Visual COBOL, which interacts with the rich code page support of the Microsoft .NET framework.
Visual COBOL follows the default behavior of Visual Studio by creating all auto-generated code files as UTF-8. The Compiler automatically compensates for this by detecting if the source code can be read as UTF-7/ASCII. If it cannot, all the files in a solution are saved as the appropriate code page, thereby avoiding corruption of PICTURE clause data items.
Code page conflicts can impact WPF and WCF projects, where by default:
To avoid code page conflicts, save all the auto-generated developer-editable .cbl files using the platform locale that matches the developer-generated of previously existing files, as follows:
The advanced save dialog is displayed indicating the current code page for the file it UTF-8.