CharSet - Oracle DB lazarus / 16-Databases ---------------------------------------------------------------------- René Baran · 2012-09-07 08:37 Hi, I have table in Oracle DB. Select write me charset "EE8ISO8859P2". Connection in PHP is throught CharSet "AL32UTF8". I did test it set up in Lazarus for DBGrid and Oracle Connection. DBGrid show me errors in names (not correct charset). Can you help me, please? Example: Kateřina .... DBGrid show me Kate?ina   :-((((( Thanks Rene ---------------------------------------------------------------------- Lacak2 · 2012-09-10 06:02 As far as I can see, CharSet property is not used in TOracleConnection ... so setting CharSet does not affects connection properties ... it is missing feature, so patch is required to fix it  Or try set UTF8 or AL32UTF8 in the NLS_LANG environment variable ... ---------------------------------------------------------------------- Zoran · 2012-09-20 08:00 The thing is that the function OCIEnvNlsCreate() should be used instead of OCIEnvCreate(). This first is the enhanced version of the later, it takes two more arguments — charset and ncharset (I do not understand what is the difference between these two). In oracleconnection unit, in procedure TOracleConnection.DoInternalConnect there are following lines: Code: [Select]  // Create environment handle   if OCIEnvCreate(FOciEnvironment,oci_default,nil,nil,nil,nil,0,FUserMem) <> OCI_SUCCESS then     DatabaseError(SErrEnvCreateFailed,self); So, this is the place where the changes are needed — the calling of OCIEnvCreate should be replaced with OCIEnvNlsCreate, with charset arguments. For now, for Oracle, I recommend using Zeos components, the trunk version. Now their Connection component have ClientCodepage property. Set it to UTF8 or AL32UTF8 (I don't understand what is the difference between these two, but it works well). Again, use the trunk version, the "stable" 6.6.6 version is very old, and 7.0 alpha is very old and buggy. (they changed their svn repository location recently, it is now http://svn.code.sf.net/p/zeoslib/code-0/trunk).