From: Jerry DeLisle Date: Sat, 16 Aug 2008 03:36:32 +0000 (+0000) Subject: re PR libfortran/35863 ([F2003] Implement ENCODING="UTF-8") X-Git-Tag: releases/gcc-4.4.0~3122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dad80a1bff182651128f352095e2163534c5d81c;p=thirdparty%2Fgcc.git re PR libfortran/35863 ([F2003] Implement ENCODING="UTF-8") 2008-08-15 Jerry DeLisle PR fortran/35863 * io.c (gfc_match_open): Enable UTF-8 in checks. * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646. From-SVN: r139146 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 3ea6c32005cf..a347d6dce335 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2008-08-15 Jerry DeLisle + + PR fortran/35863 + * io.c (gfc_match_open): Enable UTF-8 in checks. + * simplify.c (gfc_simplify_selected_char_kind): Enable iso_10646. + 2008-08-14 Janus Weil PR fortran/36705 diff --git a/gcc/fortran/io.c b/gcc/fortran/io.c index 58326b707f51..979dfc20aa32 100644 --- a/gcc/fortran/io.c +++ b/gcc/fortran/io.c @@ -1706,8 +1706,7 @@ gfc_match_open (void) if (open->encoding->expr_type == EXPR_CONSTANT) { - /* TODO: Implement UTF-8 here. */ - static const char * encoding[] = { "DEFAULT", NULL }; + static const char * encoding[] = { "DEFAULT", "UTF-8", NULL }; if (!compare_to_allowed_values ("ENCODING", encoding, NULL, NULL, open->encoding->value.character.string, diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c index 1690003dbac5..64d2be190f99 100644 --- a/gcc/fortran/simplify.c +++ b/gcc/fortran/simplify.c @@ -3795,6 +3795,8 @@ gfc_simplify_selected_char_kind (gfc_expr *e) if (gfc_compare_with_Cstring (e, "ascii", false) == 0 || gfc_compare_with_Cstring (e, "default", false) == 0) kind = 1; + else if (gfc_compare_with_Cstring (e, "iso_10646", false) == 0) + kind = 4; else kind = -1;