24 April 2005

Solaris 10: Yet another development tip

A little note about something to be careful of when compiling and developing applications within a non singlebyte locale (a Unicode or locale other than "C"). You should always check the man pages of the utilities you're using in your build process or anywhere else first before using them. Some of the utilities that are in /usr/bin or /bin only properly handle singlebyte locales and won't work properly in others.

For example, the "tr" utility in /bin/tr or /usr/bin/tr will fail with a not-so-helpful message about "bad string" when in reality you've given it perfectly valid input. This is a result of it not supporting singlebyte locales. Instead, you will have to use /usr/xpg4/bin/tr or /usr/xpg6/bin/tr which support multi-byte locales.

Technorati Tag

No comments: