Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
ServletExec Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 109
Product JTurbo
Category Internationalization
Question How do I fetch character data from SQL Server using an encoding that is different from the encoding in which it was stored ?
Answer Get the String from the ResultSet and then convert the String into its raw bytes. Then create a new String object from the bytes, specifying the new encoding.
For example:
byte bytes[] = rs.getString( i ).getBytes( "8859_1" );
String s = new String( bytes, "Cp850" );

company media information terms of use privacy policy contact us