From 59675718db0e32cbc9924faff43257067a4f158b Mon Sep 17 00:00:00 2001 From: Matthew Harmsen Date: Wed, 14 May 2014 09:54:23 -0700 Subject: Prevent LDAP Attributes from being affected by Locale * PKI TRAC Ticket #946 - Installation of IPA hangs up when LANG is set to tr_TR.UTF8 --- .../com/netscape/cms/servlet/csadmin/ConfigurationUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'base/server/cms/src/com') diff --git a/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java index b541441c5..6f560b94b 100644 --- a/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java +++ b/base/server/cms/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java @@ -24,7 +24,7 @@ import java.io.CharConversionException; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; -import java.io.FileReader; +import java.io.InputStreamReader; import java.io.IOException; import java.io.PrintStream; import java.math.BigInteger; @@ -1447,8 +1447,8 @@ public class ConfigurationUtils { PrintStream ps = null; BufferedReader in = null; - in = new BufferedReader(new FileReader(token)); - ps = new PrintStream(new FileOutputStream(filename, false)); + in = new BufferedReader(new InputStreamReader(new FileInputStream(token), "UTF-8")); + ps = new PrintStream(filename, "UTF-8"); while (in.ready()) { String s = in.readLine(); int n = s.indexOf("{"); @@ -2490,7 +2490,7 @@ public class ConfigurationUtils { if (!token.equals("Internal Key Storage Token")) { serverCertNickname = token + ":" + nickname; } - PrintStream ps = new PrintStream(new FileOutputStream(path + "/conf/serverCertNick.conf")); + PrintStream ps = new PrintStream(path + "/conf/serverCertNick.conf", "UTF-8"); ps.println(serverCertNickname); ps.close(); } @@ -3293,7 +3293,7 @@ public class ConfigurationUtils { String dir = instanceRoot + File.separator + "conf" + File.separator + "admin.b64"; cs.putString("preop.admincert.b64", dir); - PrintStream ps = new PrintStream(new FileOutputStream(dir)); + PrintStream ps = new PrintStream(dir, "UTF-8"); ps.println(b64); ps.flush(); ps.close(); -- cgit