Script file charset

Discussion forum for contributors and developers who are using the QCAD ECMAScript development platform or the C++ plugin interface or who are otherwise looking to contribute to QCAD (translations, documentation, etc).

Moderator: andrew

User avatar
Premier Member
Posts: 160
Joined: Fri May 28, 2010 7:35 pm

Script file charset

Postby hungerburg » Wed Sep 28, 2011 3:26 pm

In my script there are data structures that are visible to users. I want to have german umlauts in there. QCAD windows and QCAD linux use different charsets. All recent linux enviromnents default to utf-8, while windows (even 7) use something different.

How can I have umlauts display right in both worlds? Is there a way to tell QCAD Windows, that scripts are UTF-8?

User avatar
Site Admin
Posts: 5126
Joined: Fri Mar 30, 2007 6:07 am

Postby andrew » Wed Sep 28, 2011 3:56 pm

QCAD should actually force the UTF-8 codec for all scripts that are read. I've filed an appropriate bug report: ... ask_id=278

Edit: From the QTextStream documentation: "By default, QTextCodec::codecForLocale() is used, and automatic unicode detection is enabled." Seems like the detection does not always work.

Return to “QCAD Developers and Contributors”

Who is online

Users browsing this forum: No registered users and 4 guests