ASF Bugzilla – Attachment 28252 Details for
Bug 52579
Tomcat5.5.35+Java1.5 cannot return proper value of a request parameter
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Test.java - Test Charset.decode()
Test.java (text/plain), 877 bytes, created by
Konstantin Kolinko
on 2012-02-02 11:00:11 UTC
(
hide
)
Description:
Test.java - Test Charset.decode()
Filename:
MIME Type:
Creator:
Konstantin Kolinko
Created:
2012-02-02 11:00:11 UTC
Size:
877 bytes
patch
obsolete
>import java.util.*; >import java.nio.*; >import java.nio.charset.*; > >/** > * http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6196991 > */ >public class Test { > public static void main(String[] args) { > for (Iterator it = Charset.availableCharsets().values().iterator(); it.hasNext();) { > Charset charset = (Charset) it.next(); > try { > if (!"A".equals(roundTrip(charset, "A")) > || !"ABC".equals(roundTrip(charset, "ABC"))) { > System.out.println("Broken charset: " + charset.name()); > System.out.flush(); > } > } catch (UnsupportedOperationException ex) { > System.out.println("Cannot perform roundtrip: " + charset.name()); > System.out.flush(); > } > } > } > static String roundTrip(Charset cs, String str) { > return cs.decode(cs.encode(str)).toString(); > } >}
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 52579
:
28251
| 28252 |
28257
|
28274