spanish characters from html plain text to QTextEdit widget
-
Hi!..
i'm currently working on a word processor, its main language is spanish, so end user will use special characters as well..
While testing my program and composing text, special spanish characters works fine on QTextEdit, then when i save it, internally convert to plain html and save it to a hard disk file. The problem presents when i invert the procedure, i open the file, extract the content from file into the QTextEdit widget and everything shows fine except the special characters that are showing with interrotation sign...I think i need to import as UTF8 Unicode or something like that...
how to fix it?
thanks. -
Hi!..
i'm currently working on a word processor, its main language is spanish, so end user will use special characters as well..
While testing my program and composing text, special spanish characters works fine on QTextEdit, then when i save it, internally convert to plain html and save it to a hard disk file. The problem presents when i invert the procedure, i open the file, extract the content from file into the QTextEdit widget and everything shows fine except the special characters that are showing with interrotation sign...I think i need to import as UTF8 Unicode or something like that...
how to fix it?
thanks.@U7Development said in spanish characters from html plain text to QTextEdit widget:
I think i need to import as UTF8 Unicode or something like that
Yes, you need to store the text as Unicode (for example UTF-8) and also read it as unicode. So, how do you write the text into a file and how do you read it back?