Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » RichText,QTF,RTF... » QTF and not UTF8 characters
QTF and not UTF8 characters [message #52255] Mon, 19 August 2019 10:56 Go to next message
forlano is currently offline  forlano
Messages: 1064
Registered: March 2006
Location: Italy
Experienced Contributor
Hello,

this thread is the continuation of this other
https://www.ultimatepp.org/forums/index.php?t=msg&th=943 2&start=0&

I do not know which database was used but a strange characters entered the field of an ArrayCtrl and it is diplayed as a little square (see picture)

index.php?t=getfile&id=5895&private=0

From now on each QTF file containing the string in that field produces a mess

index.php?t=getfile&id=5896&private=0

and panic of the user.
I tried to escape the string containing the strange character with
"\1" + string + "\1" and DeQtf(string) without success.

I would like to know if it is possible to prevent the insertion of this char and/or how to correct it once it is there, i.e. how to show a valid QTF file.
Perhaps, in such scenario, it would be acceptable to have the automatic replacement of the unwanted char with something else that let the user to be aware of where exactly the intruder is.

Thanks,
Luigi




  • Attachment: error.png
    (Size: 18.79KB, Downloaded 59 times)
  • Attachment: error2.png
    (Size: 12.61KB, Downloaded 57 times)
Re: QTF and not UTF8 characters [message #52260 is a reply to message #52255] Tue, 20 August 2019 04:29 Go to previous message
zsolt is currently offline  zsolt
Messages: 584
Registered: December 2005
Location: Budapest, Hungary
Contributor
bool   CheckUtf8(const char *s, int len);
inline bool   CheckUtf8(const char *s)                { return CheckUtf8(s, (int)strlen(s)); }
inline bool   CheckUtf8(const String& s)              { return CheckUtf8(~s, s.GetCount()); }
Previous Topic: uword table and ctrl+a (bug)
Next Topic: RichEdit assertion
Goto Forum:
  


Current Time: Wed Sep 18 11:42:23 CEST 2019

Total time taken to generate the page: 0.01122 seconds