Jerry DeLisle wrote:
The attached patch fixes namelist read/write and list directed read/write to support UTF-8. I have attached a preliminary test case to use to experiment with this. I will need to set it up for the testsuite still. Regression tested on x86-64-linux-gnu. OK for trunk or wait?
Yes, now that GCC 4.10 has started: The patch is okay for the trunk. However, you should polish the test case to check the result and abort() when the result gives something unexpected.
Tobias
2014-03-29 Jerry DeLisle <jvdeli...@gcc.gnu> PR libfortran/52539 * io/list_read.c: Add uchar typedef. (push_char4): New function to save kind=4 character. (next_char_utf8): New function to read a single UTF-8 encoded character value. (read_chracter): Update to use the new functions for reading UTF-8 strings. (list_formatted_read_scalar): Update to handle list directed reads of UTF-8 strings. (nml_read_obj): Likewise update for UTF-8 strings in namelists. * io/write.c (nml_write_obj): Add kind=4 character support for namelist writes.