Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. C++ Gurus
  4. Hebrew characters disappear when I close the program
Forum Updated to NodeBB v4.3 + New Features

Hebrew characters disappear when I close the program

Scheduled Pinned Locked Moved C++ Gurus
4 Posts 2 Posters 1.5k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MichaelStein
    wrote on last edited by
    #1

    I am trying to get Hebrew Characters displayed on the console and on my GUI. I have been looking at "this":http://www.qtcentre.org/threads/27944-problem-with-Hebrew-font-in-a-control to try solve the problem. Here is my code @ QByteArray encode = "אב";
    QTextCodec* code = QTextCodec::codecForName("UTF-8");
    QString string = code->toUnicode(encode);
    out << string << endl;
    out.flush();@

    But the Characters keep appearing as "??".

    I thought that this was the only problem but I also found that when I exit the program, and then reopen it, the Hebrew characters in the editor appear as "??".

    So my question is two-fold: 1) How can I get the Hebrew characters to the console? 2) How do I generate Hebrew characters in the editor that do not disappear when I exit?

    Thanks in advance.

    PS. Using QT 4.6.3. and Windows 7

    1 Reply Last reply
    0
    • M Offline
      M Offline
      msue
      wrote on last edited by
      #2

      It is an encoding problem, for sure:
      Maybe you re-open the file with another encoding (local code page) than you saved it with (UTF-8).
      What program are you editing your file with?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        MichaelStein
        wrote on last edited by
        #3

        Thank you for responding. I found the solution: I had to change the locale in the control Panel to Israel(Hebrew). Then it worked!

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MichaelStein
          wrote on last edited by
          #4

          Also had to change from UTF-8 to Windows-1255.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved