Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why do I get an UnsupportedEncodingException when I try to do text conversion in a browser?

0
Posted

Why do I get an UnsupportedEncodingException when I try to do text conversion in a browser?

0

If you are doing something like this: AS400Text text1 = new AS400Text(10); byte[] byteArray1 = text1.toBytes(“Some text”); and you are getting this error when running in a browser: Unexpected CCSID returned from getBestGuessAS400Ccsid: 37 java.io.UnsupportedEncodingException at com/ibm/as400/access/ConvTable.getTableNoSwapChars The problem is that browsers do not ship EBCDIC-Unicode conversion tables. JDKs and most JREs ship them but browsers don’t. The Toolbox does conversion by first asking the JVM to do it. Second it looks for a table shipped with the Toolbox, and third it downloads the table from the i5/OS system. If the JVM cannot convert the string, and the Toolbox does not ship the table (it contains mostly double-byte EBCDIC tables that are not practical to download), the Toolbox can download the table from the i5/OS system, but only if the AS400Text object contains an AS400 object. The AS400 object is the only ‘path’ to the i5/OS system, so if AS400Text is not specified with a

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123