What are the i18n options for C/C++ code running on UNIX platform ?
Internationalization of UNIX based C/C++ code is quite a challenge. The code page support differs for different platforms and so is the API's. Following is the summary of options you have based on your product requirements.
- Single machine products - Products that doesn't send/receive data outside the machine it is running on. They are better off by using the standard C/C++ multi-byte support API's (clib) provided by each platform.
- Distributed Client/Server products - Product that run on different platforms exchanging data. Because each platform supports different code page, You have to trigger codepage conversions while exchanging data. There are two options in this scenario based on how you want to architect your product.
- Unicode as internal codepage - You can decide on using Unicode as the internal code page in your application and convert them to native code page only at the Input/Output boundaries. You will have to use Unicode library like the ICU (International Components for Unicode) to achieve this.
- Distributed Native codepage - You can convert the text data every time it crosses the machine boundary. This will involve extension of your communication layer for additional code-page conversions.