Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Problm with QTextEdit and accents
Forum Updated to NodeBB v4.3 + New Features

Problm with QTextEdit and accents

Scheduled Pinned Locked Moved Solved General and Desktop
qtexteditqt5.6encoding
2 Posts 1 Posters 1.2k 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.
  • A Offline
    A Offline
    Alain38 0
    wrote on last edited by
    #1

    Hi,
    I have written an application that request the opinion of the user on it. So, users can fill a QTextEdit to write their comments. The problem is that I am in France. So a lot of word contain accents. I have absolutely no problem to write text with accents in the QTextEdit. But whatever the method I use (toPlainText() or toHtml()), the resulting QString replace the accented characters by obscure characters. And I do not arrive to convert this to a right string.

    So, how can I do this?

    Thanks for your help.

    A 1 Reply Last reply
    0
    • A Alain38 0

      Hi,
      I have written an application that request the opinion of the user on it. So, users can fill a QTextEdit to write their comments. The problem is that I am in France. So a lot of word contain accents. I have absolutely no problem to write text with accents in the QTextEdit. But whatever the method I use (toPlainText() or toHtml()), the resulting QString replace the accented characters by obscure characters. And I do not arrive to convert this to a right string.

      So, how can I do this?

      Thanks for your help.

      A Offline
      A Offline
      Alain38 0
      wrote on last edited by
      #2

      @Alain38 OK: It seems in fact that wat just a problem with the console. By sending the text to the URL (using QUrlQuery for encoding) I have the text with the accents.

      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