|
|
Home » U++ Library support » RichText,QTF,RTF... » Qtf and non UTF8 strings
Qtf and non UTF8 strings [message #45241] |
Fri, 16 October 2015 09:07  |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Hello all
Sometimes for example handling file names, it is necessary to show in QTF strings that have some characters that are not UTF8. Unfortunately the QTF output gets broken with an ugly bold non UTF8 error message.
Is it possible to transform a dubious string into a right UTF8 string by, for example, substituting wrong chars with a symbol (a square or other)?
Best regards
Iñaki
|
|
|
|
|
Re: Qtf and non UTF8 strings [message #45249 is a reply to message #45246] |
Sun, 18 October 2015 11:20   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
I mean that instead of output this ugly error message and truncate string, it could be preferable to output all string replacing strange characters with a symbol (a square or other). This could be done by an U++ function called ConvertToUf8() (or a better name )
Best regards
Iñaki
[Updated on: Sun, 18 October 2015 11:21] Report message to a moderator
|
|
|
|
Re: Qtf and non UTF8 strings [message #45251 is a reply to message #45250] |
Mon, 19 October 2015 08:31   |
 |
koldo
Messages: 3432 Registered: August 2008
|
Senior Veteran |
|
|
Quote:Anyway, this is perhaps possible. Still, I would say error should be displayed.... Probably the final user wants to read a string as clear as possible, and s/he does not know about UTF8 or internal character codifications that are more devoted to programmer and debugging.
Anyway if it is necessary to have this UTF8 message, I would ask for a function to convert a string to a fully readable one so it would be as complete as possible for an end user.
Best regards
Iñaki
[Updated on: Mon, 19 October 2015 08:32] Report message to a moderator
|
|
|
|
|
|
|
|
|
Re: Qtf and non UTF8 strings [message #45343 is a reply to message #45302] |
Sat, 31 October 2015 15:06   |
|
Try DeQtf() function before call.
for ex.:
instead
Exclamation("00.-Qu├® es.pdf");
put
Exclamation(DeQtf("00.-Qu├® es.pdf"));
SergeyNikitin<U++>( linux, wine )
{
under( Ubuntu || Debian || Raspbian );
}
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Apr 25 11:54:36 CEST 2025
Total time taken to generate the page: 0.00619 seconds
|
|
|