This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] |
Jerry DeLisle wrote:This patch implements wide character I/O with default encoding for list directed formatted and formatted I/O.Great! I have to admit, I only loosely tested it.
I have a question: Can one implement writing character(kind=4) with encoding="default" such that Latin 1 (ISO-8859-1) characters will not be translated into '?' but come out as 8bit characters?
I thought that would work too, but thanks for test case! I will take this and FX's comments and get it working.
In principle I had expected that the following does so, but my tests fail:
+ *p++ = (unsigned int) source[i * kind] > 255 ? + '?' : source[i * kind + endian_off];
Test case: (Note there is some format checking which also goes wrong.)
! Compile with -fbackslash character(kind=4,len=20) :: str = 4_'X\xF8öABC' !print '(3a0)', ':',trim(str),':' ! REJECTED, but valid? print *, ':',trim(str),':' end
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |