Results 1 to 2 of 2

Thread: sql select with unicode

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2013
    Posts
    45
    Thanks
    11
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default sql select with unicode

    Hi.

    how can i select data from postgresql with unicode character?

    in sql admin work this two select:

    SELECT st_astext(way) FROM planet_osm_roads WHERE boundary='administrative' AND admin_level='2' AND name='საქართვ ელო';

    SELECT st_astext(way) FROM planet_osm_roads WHERE boundary='administrative' AND admin_level='2' AND name=U&'\10e1\10d0\10e5\10d0\10e0\10d7\10d5\10d4\1 0da\10dd';


    but when i try this select in my qt c++ program nothing send back


    sql database is in UTF8



    EDIT: this work:

    QString test= QString::fromUtf8 ("საქართვრ”ლო");
    query.prepare("SELECT st_astext(way) FROM planet_osm_roads WHERE boundary='administrative' AND admin_level='2' AND name='"+ test +"';");
    Last edited by stevocz; 18th June 2013 at 12:10.

Similar Threads

  1. Qt Unicode Problems
    By Sven in forum Qt Programming
    Replies: 9
    Last Post: 28th December 2010, 06:28
  2. [disable unicode]
    By tri407tiny in forum Newbie
    Replies: 3
    Last Post: 5th May 2010, 02:20
  3. Unicode
    By qtuser20 in forum Qt Programming
    Replies: 0
    Last Post: 28th September 2009, 21:43
  4. Printing Unicode?
    By auba in forum Qt Programming
    Replies: 2
    Last Post: 4th June 2009, 15:24
  5. i have a problem with Qt unicode
    By coder1985 in forum Qt Programming
    Replies: 5
    Last Post: 20th November 2007, 20:08

Tags for this Thread

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.