Newbies zyklotrop Posted January 20, 2011 Newbies Posted January 20, 2011 Hi, I'm trying to use the XPath function of Scriptmaster, but ran into a problem when the XML string does contain umlauts or higher ASCII characters. Even declaring the XML string as <?xml version="1.0" encoding="UTF-8"?> makes no difference. Only solution I have found is encoding the characters in unicode. Due to the fact that my XML string values can contain characters from different european languages extensive encoding and decoding would be necessary before and after the actual calculation. Is there a way to use the function with a UTF-8 character set? Thanks for any response. best Martin
clemhoff Posted January 23, 2011 Posted January 23, 2011 Hello, Change the line of the Gscript that refers to the input stream to: inputStream = new ByteArrayInputStream( someXML.getBytes("UTF-8") ) This should do the trick.
Newbies zyklotrop Posted January 25, 2011 Author Newbies Posted January 25, 2011 Hello clemhoff, I'am sooo happy! This indeed does the trick. Thank you very very much for your help. I was near to the point of creating translation tables with tons of Unicode strings. But this is far better. best Martin Hello, Change the line of the Gscript that refers to the input stream to: inputStream = new ByteArrayInputStream( someXML.getBytes("UTF-8") ) This should do the trick.
Recommended Posts
This topic is 5390 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now