Tobias Burnus wrote:
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 will investigate this. At least now we have proof of principle working and I
can focus on this a bit. I should mention, I now have unformatted working already.
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];
(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),':'
Thanks for review!