This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66499] Letters with accents change format behavior for X and T descriptors.
- From: "dominiq at lps dot ens.fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 11 Jun 2015 09:20:26 +0000
- Subject: [Bug fortran/66499] Letters with accents change format behavior for X and T descriptors.
- Auto-submitted: auto-generated
- References: <bug-66499-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66499
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-06-11
Ever confirmed|0 |1
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Confirmed from 4.8.4 up to trunk (6.0). If I add the lines
print *, len(trim(char1))
print *, len(trim(char2))
I get
23
25
So each à counts as two characters, while it is printed as only one. This make
me wonder if the code is valid. However the following variant
program test_character
real:: a
character(len=30, kind=4):: char1, char2
a = 10
char1 = 4_"Test without local char"
char2 = 4_"Test with local char ÃÃ"
10 format(2X, A, T40, f10.4)
open(6, encoding="utf-8")
print *, len(trim(char1))
print *, len(trim(char2))
write(*,10) char1, a
write(*,10) char2, a
end program
gives
23
25
Test without local char 10.0000
Test with local char ÃÂÃÂ 10.0000
???