Home » Developer & Programmer » JDeveloper, Java & XML » Cannot convert between UTF8 and UCS2
Cannot convert between UTF8 and UCS2 [message #91936] Tue, 14 October 2003 20:59 Go to next message
Erwin.Ba
Messages: 1
Registered: October 2003
Junior Member
I connect to our Oracle DataMart, and use JDBC thin
driver. Some tables can access normally. But several
tables cannot select the record, an error message is
returned:
Cannot convert between UTF8 and UCS2: failUTF8Conv

Please help me to find the root cause.
Re: Cannot convert between UTF8 and UCS2 [message #92814 is a reply to message #91936] Mon, 07 February 2005 04:59 Go to previous messageGo to next message
suvarna
Messages: 3
Registered: March 2004
Junior Member
i got error while inserting the xml data
***********************ERROR PKG_XML_EDITOR**********************************
Unhandled Error in P_UPDIns_XMLData - ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00200: could not convert from encoding UTF-8 to UCS2
Error at line 1
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 1
****************************************************************
Re: Cannot convert between UTF8 and UCS2 [message #109367 is a reply to message #92814] Wed, 23 February 2005 23:10 Go to previous messageGo to next message
Praveen Rao K
Messages: 2
Registered: August 2004
Junior Member
From: Diane Perez 16-Jan-02 20:57
Subject: Re : UTF8 and UCS2 Convertion URGENT !!

We looked this up on the Sun site and found a workaround:

For example:

city = new String( rs.getBytes( "town_city" ), "UTF-8" );
Re: Cannot convert between UTF8 and UCS2 [message #128034 is a reply to message #109367] Thu, 14 July 2005 14:13 Go to previous messageGo to next message
tihuang
Messages: 1
Registered: July 2005
Junior Member
I use Oracle's convert function to get non-utf8 data from utf8 databases.

select convert(columns_with_non_utf8, 'UTF8', 'WE8ISO8859P1') as fixed_column from sometable

See my blog for detail:
http://www.jroller.com/page/tihuang/20050607#oracle_jdbc_exception_fail_to
Re: Cannot convert between UTF8 and UCS2 [message #173138 is a reply to message #91936] Fri, 19 May 2006 10:37 Go to previous message
dikumehta
Messages: 1
Registered: May 2006
Location: London
Junior Member
I had the same issue and I was able to resolve by using the contentType='UTF-8' on the master tile in the front end (jsp). This made the request to pass the characters encoded in UTF-8 and hence no conversion would be required at the database end.

The way to test is that from the browser (before sending the request), force the encoding to be UTF-8. As soon as the response comes back, the encoding would have been changed on the browser. This is because the request and resposne were not properly forced to be UTF-8 encoded.

I hope this works for you. If not let me know.

http://forums.oracle.com/forums/message.jspa?messageID=477963
Previous Topic: Bind variable in select statement
Next Topic: Error with createPreparedStatement
Goto Forum:
  


Current Time: Wed Apr 24 19:10:37 CDT 2024