public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "burnus at gmx dot de" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug fortran/10036] New: Wide-character support for Fortran is missing
Date: Mon, 06 Apr 2009 20:18:00 -0000	[thread overview]
Message-ID: <20090406201850.10036.burnus@gmx.de> (raw)

Fortran 2003 allows and Fortran 2008 mandates support for wide-character strings
in Fortran compilers. Those are then of the type "ISO/IEC 10646-1:2000 UCS-4
character type".

To my knowledge, GCC/gfortran 4.4/4.5 is the only Fortran compiler which
supports wide strings so far.

Example program (compile with "gfortran -fbackslash"; use "\u...." and
"\U........" to enter Unicode characters).
-------------------------------------
character(kind=4) :: c
character(kind=4,len=5) :: str
c = 4_'\u00AE'
str = 4_'\u00AE\u01DD'
open(6,encoding='utf-8')
print *, c
print *, str
end
-------------------------------------

Currently, gdb prints:

(gdb) pt c
type = character(kind=4) (1)
(gdb) pt str
type = character(kind=4) (5)
(gdb) p str
$1 = (92, 117, 48, 48, 65)
(gdb) p c
$2 = (92)

(Support for entering, e.g., UTF-8 directly in the source code is planned but
not yet implemented.)

 * * *

The support in gdb should be relatively simple on top of the wide-char support
for C, cf. http://sourceware.org/ml/gdb-patches/2009-01/msg00533.html (I'm not
sure whether that is the latest patch, but it is in the CVS tree.)

-- 
           Summary: Wide-character support for Fortran is missing
           Product: gdb
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at sourceware dot org
        ReportedBy: burnus at gmx dot de
                CC: gdb-prs at sourceware dot org


http://sourceware.org/bugzilla/show_bug.cgi?id=10036

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


             reply	other threads:[~2009-04-06 20:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 20:18 burnus at gmx dot de [this message]
2009-04-06 20:30 ` [Bug fortran/10036] " jan dot kratochvil at redhat dot com
2009-04-06 21:20 ` tromey at redhat dot com

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=20090406201850.10036.burnus@gmx.de \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=gdb-prs@sourceware.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: link
Be 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).