PDA

View Full Version : The Book of QT4 by Molkentin & sample ui files



GregMalick
22nd March 2009, 09:56
Has anyone else tried the sample code provided for The Book of QT4 by Daniel Molkentin?
It seems that the ui files produce the following error:

uic: Error in line 1, column 2 : Encountered incorrectly encoded content.

So the uic is complaining that the XML is not in the correct form.

Can anyone point out how to correct the XML without having to totally rebuild these ui files from scratch? A sample from one of the projects is attached.

Lykurg
22nd March 2009, 10:11
Hi,
<?xml version="1.0" encoding="UTF-8"?>should be the first line (or other encoding)

Lykurg

GregMalick
23rd March 2009, 03:42
Hi,
<?xml version="1.0" encoding="UTF-8"?>should be the first line (or other encoding)

Lykurg

That changes the message error to:

uic: Error in line 1, column 38 : Encountered incorrectly encoded content.

Hiker Hauk
23rd March 2009, 06:52
Change your Windows system setting --> Regional and Language Settings --> Language for non-Unicode programs --> set to English

I haven't tried the suggestion above myself :D

Or please do not use Windows OS :cries: (and why I have to)

If every .ui file in the examples has this problem and consider the fact that those files are supposed to teach Qt. I suggest you do not use that book to learn. It is common sense not to use non-English characters in program source files (and nowadays everyone can write a book...).


For this special file,
Open in binary mode and alter the byte at address 0x6CE to an English character.

GregMalick
23rd March 2009, 09:20
The Regional setting (Language for non-Unicode programs) is already English.

But This lead me to the solution.
NotePad++ allows a document to be encoded in UTF-8.
uic is compiling this file now - although everything seems to be in German. :rolleyes:

At least I don't have to rebuild everything from scratch.