Bug 43543 - ODBC - unicode column names
Summary: ODBC - unicode column names
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: NeedsWindows
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 01:18 UTC by andy-scull
Modified: 2014-06-28 16:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
test case (1.98 KB, application/x-rar-compressed)
2012-05-05 01:45 UTC, andy-scull
Details
Screenshot of encoding problem in Windows 7, Base complains about not adjusted yet connection (79.02 KB, image/png)
2012-05-07 03:52 UTC, sasha.libreoffice
Details
Screeshot of column name encoding problem (in upper left corner we see ???) (53.47 KB, image/png)
2012-05-07 04:25 UTC, sasha.libreoffice
Details
Screenshot of correct result on Fedora (68.85 KB, image/png)
2012-05-07 05:10 UTC, sasha.libreoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andy-scull 2011-12-06 01:18:53 UTC
The main problem is with sqlite3's ODBC driver.
I have a .db3 database where column names contain non-ascii characters. Here's the tests I conducted (on two Win7x64 computers)
In LibreOffice Base:
1. When connecting to .db3 through ODBC and opening the table, non-ascii column names are shown as ????. In 'Edit' it shows correct column names (I had to set UTF-8 encoding for that but it worked only for edit mode)
2. When connecting to .accdb version of the same database (through ODBC) column names are ????, and Edit shows ???? too. I did not tinker with connection's settings in this test.
3. When connecting to .accdb directly without ODBC, column names are shown correctly.

4. In MSAccess 2010, connecting to .db3 through ODBC driver, column names are shown correctly everywhere.

Basically, MSAccess works fine with sqlite's ODBC driver while Base cannot SHOW non-unicode column names in table view. Almost the same happens with MSAccess's ODBC driver. Judging from my tests, I believe something's wrong with Base's handling of ODBC data. From 1 - it does get correct field names (shows them in edit mode), it just cannot show them in table mode.
I did not run anymore tests.
If the problem is in ODBC (it happens with both msaccess and sqlite drivers), please provide some technical info I could send to their authors.
Comment 1 sasha.libreoffice 2012-04-27 09:21:51 UTC
Thanks for bugreport
Please, create small .db3 database with one table containing Russian column names and attach it to this bugreport
Comment 2 andy-scull 2012-05-05 01:45:17 UTC
Created attachment 61071 [details]
test case

Here you go. One notice - I use japanese letters.
Inside are .db3 sqlite base and .odb I saved after connecting and changing encoding inside it to utf-8.
Odbc settings were all default, I didn't see any encoding options in there so I left them as is. Driver version is 0.94 64bit (http://www.ch-werner.de/sqliteodbc)

Second column in table contains a string copied from japanese google (as far as I remember).
Tables:
When viewing table data it shows as ???.
When editing table it correctly show japanese characters.

Queries: It shows ??? if I add all columns to query (*) in constructor.
If I add that column separately, it shows quoted(") japanese string.

Just to remind - there's no problems editing table, the only place it shows ??? is in column names in table/query view.

It seems to be related to system's non-unicode settings.
My comp. has russian codepage, and having these problems. I've tried linking/opening the same database on another computer (win2008r2) with japanese codepage and it seems to be working OK.
p.s. as I said, msaccess did not have this problem in the first place, it correctly connects and shows everything with any system codepage
Comment 3 sasha.libreoffice 2012-05-05 02:32:39 UTC
Thanks for attachment. I will experiment with it on next week.
Comment 4 sasha.libreoffice 2012-05-07 03:52:43 UTC
Created attachment 61134 [details]
Screenshot of encoding problem in Windows 7, Base complains about not adjusted yet connection
Comment 5 sasha.libreoffice 2012-05-07 04:25:42 UTC
Created attachment 61135 [details]
Screeshot of column name encoding problem (in upper left corner we see ???)
Comment 6 sasha.libreoffice 2012-05-07 05:10:33 UTC
Created attachment 61137 [details]
Screenshot of correct result on Fedora
Comment 7 sasha.libreoffice 2012-05-07 05:17:37 UTC
On Windows 7 32 bit problem reproducible as described. Another problem with encoding seen when database not adjusted yet and we seen error message. Problem remains if switch UI language of LO to English.

On Fedora 64 bit problem not seen. Driver from mentioned above site, self-compiled with all defaults.
Comment 8 Julien Nabet 2013-12-13 23:52:26 UTC
Just for the updated, any better with last 4.1.3?
Comment 9 Julien Nabet 2014-06-28 16:26:58 UTC
No feedback since 6 months (and no update since more 1 year).
I put it as WFM.

If you still reproduce this with recent LO version (4.2.5 is last one), don't hesitate to reopen this tracker.