Open topic with navigation
Requirements to handle character strings in UTF-8, as stored in the NuoDB database.
All character strings in the NuoDB database are stored in UTF-8 format. Your client application must take care of conversion to and from UTF-8 of input data and output data.
You can handle this in the client application by setting the
LC_ALL environment variables to the encoding you are using. Note that these settings are required to interact with
nuosql, or any other command line client by means of
stdout, as well as for a client reading from a file that has a non-default encoding.
On Windows, you may also be required to use the
All C++ clients must call
setlocale() with an empty string to initialize the client with information about the current locale settings. For example:
Sometimes, locale settings are inherited from the environment of the server and client side settings are ignored
In such instances, use the supported options of the correct binary and enable 'use-locale' in the test framework, ensuring that it is only specified when the related binary supports it.
Once, upon running Tester tests on a machine with locale set to 'en_IE.UTF-8' - any test that used date formatting gave the wrong results, and nothing performed on the client side locale-wise had any affect. This could lead to a problem if you have multiple TEs in different locales - each TE could start up with a different locale, meaning that you would end up with different results depending on which TE you got connected
A workaround fixes this problem by allowing the locale to be set on a per-TE basis. It is preferable though to propagate the locale from the client to server although this could cause some problems with Microsoft Windows locales that are specified differently to the Linux and Mac environments.