History

Restored codepage autodetection, as it is working now

Dmitry Kabak (userdima committed 13 years ago

Commit 9bb2f901 parent c9890111 file · +9 −13Browse files

Showing the changes to java (1 of 1 file). Show all

Unified · Split

java/pkg/java/nio/charset/Charset.java+9−13
@@ -612,19 +612,15 @@ public abstract class Charset · 611 unmodified lines
612 */612 */
613 public static Charset defaultCharset() {613 public static Charset defaultCharset() {
614 if (defaultCharset == null) {614 if (defaultCharset == null) {
615 // [Inferno] <615 synchronized (Charset.class) {
616 //synchronized (Charset.class) {616 String csn = AccessController.doPrivileged(
617 // String csn = AccessController.doPrivileged(617 new GetPropertyAction("file.encoding"));
618 // new GetPropertyAction("file.encoding"));618 Charset cs = lookup(csn);
619 // Charset cs = lookup(csn);619 if (cs != null)
620 // if (cs != null)620 defaultCharset = cs;
621 // defaultCharset = cs;621 else
622 // else622 defaultCharset = forName("UTF-8");
623 // defaultCharset = forName("UTF-8");623 }
624 //}
625 // [Inferno] =
626 defaultCharset = forName("UTF-8");
627 // [Inferno] >
628 }624 }
629 return defaultCharset;625 return defaultCharset;
630 }626 }