byte /text question
Posted in 2003
Topics: Internationalization & Character Sets
What is the documented and known behavior of inserting hex constants into a byte/text column from a client to a server which have different code pages? Will any code page / character set conversion take place? eg: insert into t1 values ('AA') Is it even allowed? Thanks Aakash
Aakash Bordia wrote: > What is the documented and known behavior of inserting hex constants into a > byte/text column from a client to a server which have different code pages? > Will any code page / character set conversion take place? > eg: insert into t1 values ('AA') > Is it even allowed? If the only column in table t1 is a BYTE or TEXT column, your insert statement will fail - there are no BYTE or TEXt literal strings. At one level, that renders the question about code set conversion irrelevant. However, if we assume that you work around that issue with a suitable host variable (the only way to do it - if you go via a LOAD statement, it does the conversion to host variable for you), then I would expect that a BYTE value would be left strictly alone (no code set conversion at all - it is binary data). The case with a TEXT value is trickier; I think there is room to argue that code set conversion should take place, but whether it does or not is a separate issue. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/