illegal character

Discussion in 'C Programming' started by sergej.vasiljev@gmail.com, Jun 14, 2005.

  1. Guest

    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.
     
    , Jun 14, 2005
    #1
    1. Advertisements

  2. wrote:
    > 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.


    --
    Michael Tosch @ hp : com
     
    Michael Tosch, Jun 14, 2005
    #2
    1. Advertisements

  3. Guest

    our application work in different locales and what is why strcmp is not
    acceptable for us.
     
    , Jun 14, 2005
    #3
  4. Guest

    our application works in different locales and what is why strcmp is
    not acceptable for us.
     
    , Jun 14, 2005
    #4
  5. On Tue, 14 Jun 2005 00:35:50 -0700, sergej.vasiljev wrote:

    > 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
     
    Lawrence Kirby, Jun 14, 2005
    #5
  6. pete Guest

    Michael Tosch wrote:

    > strcmp() is locale-independent.


    Though whether strcmp("A","B") is positive or negative
    is implementation defined.

    --
    pete
     
    pete, Jun 14, 2005
    #6
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Velvet
    Replies:
    9
    Views:
    15,623
    Joerg Jooss
    Jan 19, 2006
  2. William Brogden
    Replies:
    1
    Views:
    8,667
    Manoj S. P.
    Jun 30, 2003
  3. Timo Nentwig
    Replies:
    1
    Views:
    3,774
    Igor N. Kolomiyets
    Feb 6, 2004
  4. Steve Rainbird

    illegal escape character

    Steve Rainbird, Jun 7, 2006, in forum: Java
    Replies:
    7
    Views:
    18,742
    Mark Space
    Jun 8, 2006
  5. Andy Fish

    illegal character in xml file

    Andy Fish, Feb 6, 2007, in forum: XML
    Replies:
    1
    Views:
    639
    Joseph Kesselman
    Feb 6, 2007
  6. Carfield Yim

    How many illegal character for jdom?

    Carfield Yim, Oct 28, 2009, in forum: Java
    Replies:
    4
    Views:
    6,697
    Carfield Yim
    Dec 1, 2009
  7. Mike McGranahan

    XML serialization of illegal character entities

    Mike McGranahan, Jul 11, 2006, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    341
    Mike McGranahan
    Jul 11, 2006
  8. Replies:
    10
    Views:
    1,270
    Ted Zlatanov
    Aug 25, 2011
Loading...