Unicode Support

.NET strings and controls are all UNICODE. Therefore the ported application becomes UNICODE compliant without any modifications. However, when external resources are involved, you may need to modify the application and/or the external resource to become UNICODE. Generally there are three external resources that are not UNICODE: Database, Files, and External functions.

UNICODE Database

If your database is not UNICODE, make sure that the <encoding> setting in the sql.config file is set to Ansi. On the contrary, if you have converted the database to UNICODE, or are connecting to a UNICODE database, make sure that the <encoding> setting for the UNICODE data source in sql.config is set to Unicode.

UNICODE Files

All files operation in SQLWindows/Team Developer are not UNICODE. If you want to open, read and write UNICODE files (or using other standard encodings), you can use the following additional flags with the SalFileOpen function: Sys.OF_Unicode, Sys.OF_UTF7, Sys.OF_UTF8.

UNICODE Externals

By default, when passing strings to an external interop call, .NET converts the string to ASCII. If you need to call external DLLs that expect a UNICODE string you need to add the CharSet=CharSet.Unicode attribute to the external declarations in the Ext class (or Externals for VB.NET) in the ported project.

Last updated