From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22735 invoked by alias); 23 Mar 2004 04:44:15 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 22582 invoked by uid 48); 23 Mar 2004 04:44:14 -0000 Date: Tue, 23 Mar 2004 04:44:00 -0000 From: "joeclark at iastate dot edu" To: java-prs@gcc.gnu.org Message-ID: <20040323044412.14687.joeclark@iastate.edu> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug java/14687] New: Incorrect UTF-8 byte->String conversion X-Bugzilla-Reason: CC X-SW-Source: 2004-q1/txt/msg00009.txt.bz2 List-Id: 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