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] New: Support UTF-8 (and other encodings) in the source file (.f90) for CHARACTER(kind=4) Date: Wed, 04 Aug 2010 10:16:00 -0000 [thread overview] Message-ID: <bug-45179-13404@http.gcc.gnu.org/bugzilla/> (raw) libcpp allows one to directly input non-ascii characters in source files (.f90 etc.); the used encoding can be set using the options: -finput-charset=UTF-8 Cf. also: -fexec-charset and -fwide-exec-charset and http://gcc.gnu.org/onlinedocs/gcc/Preprocessor-Options.html If one uses gfortran -cpp -finput-charset=UTF-8 wide.f90 one currently gets the error: f951: warning: command line option "-finput-charset=UTF-8" is valid for C/C++/ObjC/ObjC++ but not for Fortran [enabled by default] The files scanner.c etc. do support the reading of wide chars thus, in principle, only few changes should be required. Caveat: Many people still use kind=1 strings - but with non-ASCII characters; one should try to make sure that this continues to work. Stuffing the characters in as one currently does is one option. For Latin1 (ISO 8859-1) characters one can also simply strip off the high bytes and write only the first byte. Using UTF-8 also works - though len() will report too many characters. -- Summary: Support UTF-8 (and other encodings) in the source file (.f90) for CHARACTER(kind=4) Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45179
next reply other threads:[~2010-08-04 10:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-08-04 10:16 burnus at gcc dot gnu dot org [this message] 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
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=bug-45179-13404@http.gcc.gnu.org/bugzilla/ \ --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).