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 libc/649] printf("%.*s", str) bug in a Qt application, also sprintf(s, "%.*s", str) bug


------- Additional Comments From jakub at redhat dot com  2005-01-11 10:21 -------
My guess is that Qt calls setlocale (LC_ALL, "") or similarly and you are using
UTF-8 locale or something similar.
ISO C99 requires for %.*s to only write complete characters that fit below the
precision number of bytes.  If you are using say UTF-8 locale, but ISO-8859-1
characters as shown in the input file you provided, some of the strings are
not valid UTF-8 strings, therefore sprintf fails with -1 because of the
encoding error.
That's not a bug in glibc.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID
            Summary| printf("%.*s", str) bug in |printf("%.*s", str) bug in a
                   |a Qt application, also      |Qt application, also
                   |sprintf(s, "%.*s", str) bug |sprintf(s, "%.*s", str) bug


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

------- 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]