public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/45179] Support UTF-8 (and other encodings) in the source file (.f90) for CHARACTER(kind=4) Date: Wed, 04 Aug 2010 12:39:00 -0000 [thread overview] Message-ID: <20100804123926.8705.qmail@sourceware.org> (raw) In-Reply-To: <bug-45179-13404@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from burnus at gcc dot gnu dot org 2010-08-04 12:39 ------- Created an attachment (id=21393) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21393&action=view) Support -finput-charset= (accepts option, but does not fix the issue) This patch allows the -finput-charset= but it does not fix the actual problem. scanner.c has: load_line, which works with wide strings, but gets the letters via getc(). Maybe one could implement UTF-8 reading for strings in scanner.c - and use libcpp (-cpp) to convert the input encoding to UTF-8, if it isn't UTF-8. http://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgfortran/io/read.c;hb=HEAD#l236 If one uses CPP, one probably needs to set (internally) wide_charset to UTF-8 such that CPP outputs UTF-8. Possible work plan: a) if -finput-charset= is used but CPP is not used: Allow UTF-8 but print an error for other encodings. Read internally as UTF-8. b) if -finput-charset= is used with -cpp: Allow it and set exec encoding (or whatever it is called) to UTF-8 such that libcpp returns an UTF-8 string to gfortran c) By default continue to use the current means of input, i.e. a simple getc. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45179
next prev parent reply other threads:[~2010-08-04 12:39 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-08-04 10:16 [Bug fortran/45179] New: " burnus at gcc dot gnu dot org 2010-08-04 10:19 ` [Bug fortran/45179] " burnus at gcc dot gnu dot org 2010-08-04 12:39 ` burnus at gcc dot gnu dot org [this message] [not found] <bug-45179-4@http.gcc.gnu.org/bugzilla/> 2014-05-04 14:14 ` dominiq at lps dot ens.fr
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100804123926.8705.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).