Results 1 to 12 of 12

Thread: Reading umlaut letters from sqlite database

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Reading umlaut letters from sqlite database

    Which version of SQLITE? How did you enter the data into the database? Don't use a separate text codec, the driver for sqlite should convert the data for you.

  2. #2
    Join Date
    Nov 2006
    Posts
    72
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: Reading umlaut letters from sqlite database

    version is sqlite 3. I have already received database with names inside, and saw with different sqlite browsers that names are there and are entered correctly.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Reading umlaut letters from sqlite database

    Does removing the extra codec help?

  4. #4
    Join Date
    Nov 2006
    Posts
    72
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: Reading umlaut letters from sqlite database

    No. Actually, the first code I recieved didn't have that extra codec call. I added it, but it made no diference. Any more ideas?

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Reading umlaut letters from sqlite database

    Are you sure the data in the database is encoded in UTF-8?

  6. #6
    Join Date
    Nov 2006
    Posts
    72
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: Reading umlaut letters from sqlite database

    As far as I know, Sqlite operate with UTF-8 encoding. Is there any way I can check that, and can you suggest me ony other encoding I could try? (I think that that could be checked with changing codec call in my codec, by trial and error repeating).

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Reading umlaut letters from sqlite database

    I had problems with SQLite and Qt myself and in the end it proved that the SQLite database was not UTF-8 encoded after all. So try fetching the data with some other mechanism (but not the sqlite3 console, it doesn't convert between local and utf - that was the base of my problems) and see if they are utf-8 encoded.

  8. #8
    Join Date
    Nov 2006
    Posts
    72
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: Reading umlaut letters from sqlite database

    Thank you for your fast reply, but I didn't understand completely what you wrote. Can you go in more detail please? Which other mechanism to fetch data? I'm a bit confused, sorry.

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Reading umlaut letters from sqlite database

    Quote Originally Posted by Djony View Post
    Which other mechanism to fetch data?
    SQLite C API.

  10. #10
    Join Date
    Nov 2006
    Posts
    72
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    8
    Thanked 1 Time in 1 Post

    Default Re: Reading umlaut letters from sqlite database

    You mean, to use sqlite c api (in some simple application) to read data from database and see are they in UTF-8 encoded?

  11. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Reading umlaut letters from sqlite database

    Yes. That's exactly what I mean.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.