Hi,
Description:
I have a Base64 encoded string and I am using this API for it,
[ http://ws.apache.org/axis/java/apiDocs/org/apache/axis/encoding/Base64.html]
I am simply trying to convert it to a String object.
Problem:
When I try and write the String, ( which is xml ) as a XMLType to a oracle 9i database I am getting a "Cannot map Unicode to Oracle character." The root problem is because of the conversion of the base64 encoded string to a String object. I noticed that some weird square characters show up at the start of the string after i convert it. It seems like I am not properly converting to a String object. If i change the value of the variable on the fly and delete these little characters at the start, I don't get the uni code error. Just looking for a second thought on this.
Code: Converting Base64 Encoded String to String object
public String decodeToString( String base64String )
{
byte[] decodedByteArray = Base64.decode( base64String );
String decodedString = new String( decodedByteArray, "UTF-8");
}
Any suggestions?