var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: How to retrieve DB encoding as generically as possible?
is there a way to determine the encoding (e.g UTF-8) a database was created with via JDBC? The goal is to determine that the database encoding is UTF-8 but it needs to be operable with as many DBMS as possible.
If not is there a way to get this info from DB2 only?
thanks in advance.
Usually to get the database metadata they use the method
DatabaseMetaData Connection :: getMetaData()
after connecting to a database.
But none of the DatabaseMetaData class methods serves for getting the database locale info.
You can read about these classes here:
As far as I can see, the best way would be SELECT'ing locale info from database system catalog table, as it can be done with InterBase or Informix.
Hope, I've been of some help.
P.S. In order to select from database system catalog table one should connect with sufficient access rights. And, surely, one should know the names of those tables.
okay thanks, that is what we decided to do. It's not as flexible as we would like but it will do, we will just need to customise based on dbms used for app persistency.
thanks a lot.