[erlang-bugs] ODBC R12B-5 Win32: Select statement doesn't work

Ingela Anderton Andin ingela@REDACTED
Wed Dec 3 15:37:45 CET 2008


Hi!

After your first mail I tried to reproduce the problem but failed. After 
your second mail it explains it.
Erlang does not have a full unicode support but it will have more 
support for it in R13 after that we can
see how it could be used in applications such as odbc. In the meantime 
of course we could add
so that the c-code handles the SQL-datatypes and make it up to the user 
to handle the list of bytes that will be returned.
If you have such a patch we can include it for R13. And after that we 
will look into what could be done for odbc.

Regards Ingela Erlang/OTP -Ericsson


Денис Артёмов wrote:
> Another results of my investigations: it looks like author of ODBC Erlang library didn't provide the support of Unicode at all.
>
> I could to avoid "not supported type" error messages by adding
>
>     case SQL_WCHAR:
>     case SQL_WVARCHAR:
>     case SQL_WLONGVARCHAR:
>
> into map_sql_2_c_column function of odbcserver.c file like this:
>
> static db_result_msg map_sql_2_c_column(db_column* column)
> {
>     db_result_msg msg;
>
>     msg = encode_empty_message();
>         
>     switch(column -> type.sql) {
>     case SQL_CHAR:
>     case SQL_VARCHAR:
>
>     case SQL_BINARY:
>     case SQL_LONGVARCHAR:
>     case SQL_VARBINARY:
>     case SQL_LONGVARBINARY:
>
>     case SQL_WCHAR:         //
>     case SQL_WVARCHAR:      // I've added this lines
>     case SQL_WLONGVARCHAR:  //
>
>     column -> type.len = (column -> type.col_size) +
>
>     ...
>
> ... and by recompiling odbcserver.exe with changed sources.
>
> Error messages don't occur this way, but the data is retrieved in raw format depending of charset of database. For example, word "Денис" is retrieved as {[208,148,208,181,208,189,208,184,209,129]} for UTF-8 charset.
>
> Will ODBC library support unicode correctly?
> _______________________________________________
> erlang-bugs mailing list
> erlang-bugs@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-bugs
>
>   




More information about the erlang-bugs mailing list