public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
From: "joeclark at iastate dot edu" <gcc-bugzilla@gcc.gnu.org>
To: java-prs@gcc.gnu.org
Subject: [Bug java/14687] New: Incorrect UTF-8 byte->String conversion
Date: Tue, 23 Mar 2004 04:44:00 -0000	[thread overview]
Message-ID: <20040323044412.14687.joeclark@iastate.edu> (raw)

The following code snippet, when given a valid sequence of ASCII bytes, works as
expected on Sun's JDK. However, with gcj 3.3.1 (Cygwin/mingw special), the
resulting program returns only "????" as the result string.  The same code using
"iso-8859-1" encoding works on both platforms.

try {
  String byteStr = new String(bytes, "UTF-8");
  System.out.println("byteStr = " + byteStr);
}

This problem was reported on the gcc java mailing list here:
http://gcc.gnu.org/ml/java/2003-09/msg00116.html.  However, apparently the
problem still exists, and the thread didn't end with any plans to fix the problem.

-- 
           Summary: Incorrect UTF-8 byte->String conversion
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: joeclark at iastate dot edu
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14687


             reply	other threads:[~2004-03-23  4:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-23  4:44 joeclark at iastate dot edu [this message]
2004-03-23 17:28 ` [Bug java/14687] " tromey at gcc dot gnu dot org
2004-06-26 20:39 ` pinskia at gcc dot gnu dot org
2004-06-26 22:10 ` joeclark at iastate dot edu
2004-06-27  0:43 ` [Bug libgcj/14687] [win32] " pinskia 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=20040323044412.14687.joeclark@iastate.edu \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=java-prs@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: 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).