http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58628

            Bug ID: 58628
           Summary: Incorrect std::isalpha results with UTF-8 locale on
                    illumos
           Product: gcc
           Version: 4.4.7
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alp at rsu dot ru

The following example when compiled with gcc 3.4,4.7 or 4.4  and launched with
en_US.UTF-8 locale on illumos says that char with 196 code is alphabetic,
however it's not a correct UTF-8 symbol.


$ env LANG=en_US.UTF-8 ./test_ctype
"�"
letter is �
(int)letter is 196
std::use_facet:true

If this program is compiled with Sun Studio Compiler (CC) results are:
$ env LANG=en_US.UTF-8 ./test_ctype_CC
"�"
letter is �
(int)letter is 196
std::use_facet:false

if I compile this program on Linux / FreeBSD , results are correct.

Related OpenIndiana bug report: 
    https://www.illumos.org/issues/4173
Discussion on illumos-dev:
    http://comments.gmane.org/gmane.os.illumos.devel/14193

Reply via email to