https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45179
epagone <epagone at email dot it> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |epagone at email dot it --- Comment #6 from epagone <epagone at email dot it> --- Still present in gfortran version 8.1.0. I have developed a simple workaround (although clunky) to overcome the wrong output of len() and len_trim() using kind=1 strings. I simply count how many characters are non-ASCII (comparing with achar() between 1 and 127) and then correct the output accordingly. In my (limited) tests it works, but it might have shortcomings.