Lars Appel ([log in to unmask]) wrote:
: I also recall being surprised be the "extranous" chars
: returned by MPE/iX setlocale()... but there is a scheme
: in it... I vaguely recall that if you look closer (i.e.
: with display function ON) you will even notice a byte
: in the string that is the binary index of the attribute.
: If you request LC_ALL, the string will have a sequence
: of (index):(value) pairs, if I recall correctly.
: So this is probably "designer's choice" and not a kind of bug.
Lars is right. The "extraneous" characters are there on
purpose. When the second argument to setlocale() is a
null pointer, the format of the returned string is unspecified.
A portable program should not make any assumptions about its
content.
Walter Murray
Hewlett-Packard
HP C/iX team