What database? MySQL has SHOW CHARACTER SET since 4.1.
Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>
Joined: Jul 14, 2004
i meant via jdbc, i gotta write a snippet to tell what the charset is in the server side and then retrieve the character with corresponding charset in the client side eg. server client utf8 iso-8859-1 gbk gbk
I'm facing exactly same problem, I have to dislay some Danish characters. When I try to do so I get a '?' in place of the character.
Tried converting the String returned from <resultset>.getString("TITLE"); method in to Byte array and passing it to String constructor, that is :-> String(byte,"UTF-16") that creates String out of the byte array using the Encoding passed as second parameter.
Joined: Jul 31, 2003
Again, what database? Using JDBC with MySQL you execute "SHOW CHARACTER SET;". The single row result set then contains the character set name the database uses.
Refer to Chapter 10 in MySQL documentation for more info on character set support in MySql.
You can use "utl_i18n.get_default_charset" function in Oracle to get the CharacterSet. Syntax : utl_i18n.get_default_charset(language IN VARCHAR2, context IN PLS_INTEGER DEFAULT GENERIC_CONTEXT, iswindows IN BOOLEAN DEFAULT FALSE) RETURN VARCHAR2;
Like : SELECT utl_i18n.get_default_charset(<Your_language_name>,0) FROM dual;
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: any chance to know the charset of a remote database?