From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11699 invoked by alias); 17 Apr 2005 15:21:21 -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 11684 invoked by uid 48); 17 Apr 2005 15:21:21 -0000 Date: Sun, 17 Apr 2005 15:21:00 -0000 Message-ID: <20050417152121.11682.qmail@sourceware.org> From: "ovidr at users dot sourceforge dot net" To: java-prs@gcc.gnu.org In-Reply-To: <20050417124104.21068.gruni.ca@gmail.com> References: <20050417124104.21068.gruni.ca@gmail.com> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug libgcj/21068] String(strBytes, "UTF-16LE"); thorws java.io.UnsupportedEncodingException X-Bugzilla-Reason: CC X-SW-Source: 2005-q2/txt/msg00165.txt.bz2 List-Id: ------- Additional Comments From ovidr at users dot sourceforge dot net 2005-04-17 15:21 ------- The work-around which forces inclusion of the needed class: import java.io.UnsupportedEncodingException; import java.nio.charset.Charset; public class GcjStringTest { static { gnu.gcj.convert.Input_UnicodeLittle i_UL = new gnu.gcj.convert.Input_UnicodeLittle(); } public static void main(String args[]) throws UnsupportedEncodingException{ System.out.println("Available Charsets are:\n" +Charset.availableCharsets().toString()); byte[] strBytes = {0x12,0x0A,0x14,0xF}; //Creating String with UTF which is available according to Charsets String mine = new String(strBytes, "UTF-16LE"); //shouldn't recieve Exception System.out.println("["+mine+"]"); } } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21068