Problems setting CP1252 encoding

Michael Bergmann mb at mbergmann-sh.de
Sun Apr 30 13:36:23 BST 2023


Hello all,

I'm using Qt6.5/C++/QScintilla v2.13.4 in order to develop an editor  
that is capable of reading and writing text files in Amiga encoding  
format - and I'm stuck with it.

The Amiga uses 8-bit char set/char code US-ASCII, ISO 8859-1/ISO/IEC  
6429/CP1252. Can someone please show me how to set that?
ATM I'm experimenting with the following:

ui->textEdit->SendScintilla(ui->textEdit->QsciScintilla::SCI_STYLESETCHARACTERSET, 1,  
QsciScintilla::SC_CHARSET_8859_15);
          
ui->textEdit->SendScintilla(ui->textEdit->QsciScintilla::SCI_SETCODEPAGE, 1,  
QsciScintilla::SC_CP_UTF8);

This does not result in what I need. How to do it correct?

Also, when loading a textfile that contains german Umlauts, generated  
on my Amiga, I got weird results with characters not recognized  
correctly.

How to determine and set the charset/encoding of a text file when it  
was loaded?

Any help appreciated - thanks for your attention!

Kind regards,

Michael





More information about the QScintilla mailing list