https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65144
Bug ID: 65144 Summary: Problems printing, reading and accessing substrings of ISO_10646 character variables Product: gcc Version: 4.9.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: zbeekman at gmail dot com Created attachment 34820 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34820&action=edit reproducer program This bug may be related to 65125, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65125 I’m not sure. Basically it seems that 3 things are happening: - Unicode strings aren’t being output correctly to to stdout, it seems only the first few characters are output. This *could* be an issue related to what gfortran thinks the encoding of the tty is. Further testing reveals that it seems to output to a file opened with uff-8 encoding OK - Unicode substrings retain the correct kind as long as they are not parameters (see 65141 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65141) BUT the resulting representation seems to be that of DEFAULT character kind. (i.e. the characters change when a substring expression is used, characters 2-4 in str(2:4) are different than characters 2-4 in str). This happens even when writing to a file opened with uff-8 encoding.