illegal character

S

sergej.vasiljev

Hello,

while doing strings pattern matching we use '/377' character.
But this char is illegal for some Asian locales on Solaris.
For example, strcoll returns error because this character is outside
the domain of the collating sequence.

Which other character can be used instead?

Thanks.
 
M

Michael Tosch

Hello,

while doing strings pattern matching we use '/377' character.
But this char is illegal for some Asian locales on Solaris.
For example, strcoll returns error because this character is outside
the domain of the collating sequence.

Which other character can be used instead?

Thanks.

strcmp() is locale-independent.

man regexp

shows you another powerful alternative.
 
S

sergej.vasiljev

our application work in different locales and what is why strcmp is not
acceptable for us.
 
S

sergej.vasiljev

our application works in different locales and what is why strcmp is
not acceptable for us.
 
L

Lawrence Kirby

Hello,

while doing strings pattern matching we use '/377' character.
But this char is illegal for some Asian locales on Solaris.
For example, strcoll returns error because this character is outside
the domain of the collating sequence.

Which other character can be used instead?

The C language itself doesn't define specific character sets. If \377 is
not a valid character in a particular locale the question arises as to why
it is appearing in data for that locale. You'll need to decide how you
want to interpret such values.

It may be that \377 is being used as an escape character for multibyte
character encoding and as such it would not by itself be considered a
valid character.

Ultimately these issues are platform-specific so to resolve this for
Solaris or at least get a Solaris-aware solution you might try asking in
comp.unix.solaris.

Lawrence
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top