Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 198068 Details for
Bug 349465
[1.7] Console view output scrambled when launching with UTF-8 or UTF-16 and latest IBM 1.7 JRE
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Test Case
ConsoleBug.java (text/x-java), 1.53 KB, created by
Dani Megert
on 2011-06-16 04:02:13 EDT
(
hide
)
Description:
Test Case
Filename:
MIME Type:
Creator:
Dani Megert
Created:
2011-06-16 04:02:13 EDT
Size:
1.53 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 20011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: > * IBM Corporation - initial API and implementation > *******************************************************************************/ >import java.io.File; >import java.io.FileReader; >import java.io.FileWriter; >import java.io.IOException; >import java.io.Reader; >import java.io.Writer; >import java.nio.CharBuffer; > > >public class ConsoleBug { > > private static final String DEFAULT_ENCODING = System.getProperty("file.encoding"); > > public static void main(String[] args) throws IOException { > writeFile(); > } > > private static void writeFile() throws IOException { > String s="Encoding: " + DEFAULT_ENCODING + "\nBöse\nSnowman: \u2603\n"; > System.out.println(s); > System.out.println("------------------------"); > File f= new File("C:\\eclipse\\workspaces\\tmp\\ConsoleBug\\out.txt"); > Writer w= new FileWriter(f); > w.write(s); > w.close(); > > Reader r= new FileReader(f); > CharBuffer buf= CharBuffer.allocate(1000); > int total= 0; > int count= r.read(buf); > while (count != -1) { > total += count; > count= r.read(buf); > } > buf.position(0); > buf.limit(total); > System.out.println(buf); > r.close(); > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 349465
: 198068