Results 1 to 2 of 2

Thread: How use unicode in Arabic language?

  1. #1
    Join Date
    Feb 2008
    Posts
    154
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Default How use unicode in Arabic language?

    Hi,
    I am using clucene library to index and search my text .I am using Arabic text only.
    when i retrieve the text from the highlighter i gets it in a wchar_t* pointer.

    So, I am using QString::fromWCharArray(wchar_t*) but the text does not appear in Arabic,it appears in strange characters.
    I also tried
    Qt Code:
    1. QString::fromUtf16()
    2. QString::utf8()
    3. QString::data()
    To copy to clipboard, switch view to plain text mode 
    can any body help me to display it in right character codec?
    Thank you

  2. #2
    Join Date
    Jan 2007
    Posts
    29
    Thanks
    3

    Default Re: How use unicode in Arabic language?

    Not sure but for a Japanese project my main.cpp looks like this.

    Qt Code:
    1. int main( int argc, char* argv[] )
    2. {
    3. QApplication app( argc, argv );
    4. QTextCodec::setCodecForTr( QTextCodec::codecForName( "UTF-8" ) );
    5. QTextCodec::setCodecForCStrings( QTextCodec::codecForName( "UTF-8" ) );
    6. auction* my_auction = new auction();
    7. my_auction->show();
    8. return app.exec();
    9. }
    10.  
    11. I seem to recall it not display the characters at all (even though they were simply hard-coded into the source) w/o those two lines... or at least one.
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Arabic language support problem (right to left)
    By sam_er83 in forum Qt Tools
    Replies: 1
    Last Post: 14th May 2012, 09:48
  2. Mysql and Arabic encoding issue
    By yazwas in forum Qt Programming
    Replies: 5
    Last Post: 23rd March 2011, 15:43
  3. Arabic language support problem (right to left)
    By sam_er83 in forum Qt Programming
    Replies: 0
    Last Post: 9th September 2009, 07:00
  4. Fonts opensource for chinese and arabic
    By recalcati in forum Qt Programming
    Replies: 0
    Last Post: 30th April 2008, 10:06

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.