Command-line utilities
The command-line utilities are routines invoked in a shell window. In addition they are used within the IDE for testing, XML complies, and so on.
In all cases, the method of invocation places some restrictions on the use of Unicode for input and output:
- The utilities are implemented in C and take their input from the parameters passed in the locale ANSI codepage. In most cases, you cannot enter these data in UTF-8. Instead, the routines internally change the encoding of those parameters that must be in UTF-8 as required. For example, the XML root element.
- When message-type data files are
opened, the file encoding must be UTF-8 to simulate exactly what would happen during
engine processing. If the file is in another encoding, then use the
-e
switch to change the encoding before being processed.-x
is used for hcitpstest and hciroutetest. This corresponds to using the thread inbound encoding selection. - The utilities currently
write their output to
StdOut
orStdErr
in UTF-8. Because the shell windows, such as cmd in Windows, might not display data in UTF-8, it might display UTF-8 data as trash. In this case, pipe the output of the routine to a file and view it in an editor that displays the encoding. - In the case of Redhat Linux, the locale may be UTF-8 which permits display of message data with that encoding.
- If the environment does not support characters foreign to the locale, then foreign characters cannot be entered and might be displayed as question marks or garbage. For example, character-based terminals,
- In Windows, with the main locale set to English, and the files and other data are in a non-English locale, you must set the non-Unicode applications locale to that of the data, file names, and so on.