mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 20:12:07 +01:00
Fixed base 64 encoding/decoding.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1976 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
7cc11fb96e
commit
fc70c90e67
1 changed files with 3 additions and 3 deletions
|
@ -285,7 +285,7 @@ public class StringUtils {
|
||||||
public static String encodeBase64(String data) {
|
public static String encodeBase64(String data) {
|
||||||
byte [] bytes = null;
|
byte [] bytes = null;
|
||||||
try {
|
try {
|
||||||
bytes = data.getBytes("UTF8");
|
bytes = data.getBytes("ISO-8859-1");
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException uee) {
|
catch (UnsupportedEncodingException uee) {
|
||||||
uee.printStackTrace();
|
uee.printStackTrace();
|
||||||
|
@ -343,8 +343,8 @@ public class StringUtils {
|
||||||
public static byte[] decodeBase64(String data) {
|
public static byte[] decodeBase64(String data) {
|
||||||
byte [] bytes = null;
|
byte [] bytes = null;
|
||||||
try {
|
try {
|
||||||
bytes = data.getBytes("UTF8");
|
bytes = data.getBytes("ISO-8859-1");
|
||||||
return decodeBase64(bytes).getBytes("UTF8");
|
return decodeBase64(bytes).getBytes("ISO-8859-1");
|
||||||
}
|
}
|
||||||
catch (UnsupportedEncodingException uee) {
|
catch (UnsupportedEncodingException uee) {
|
||||||
uee.printStackTrace();
|
uee.printStackTrace();
|
||||||
|
|
Loading…
Reference in a new issue