This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug localedata/540] Printing a double messes up processing of locale-specific characters.


------- Additional Comments From roger at infomine dot ucr dot edu  2004-11-23 17:49 -------
The original reporter sent the wrong test code by mistake. The correct test code, which still reproduces 
the problem, even with g++-3.4, is as follows:

#include <iostream>
#include <clocale>

int main()
{
        // std::setlocale(LC_CTYPE, "en_IE@euro");
        std::setlocale(LC_CTYPE, "en_US.ISO-8859-15");
        std::cout << (2.0) << '\n';
        std::cout << (::isalpha('\xE8')?"true":"false") << '\n';
}

The result of this is to print 2 followed by false. Commenting out the std::cout << 2.0 line prints true, 
instead. That is true with either choice of locale as specified above.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |


http://sources.redhat.com/bugzilla/show_bug.cgi?id=540

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]