Results 1 to 5 of 5

Thread: The Book of QT4 by Molkentin & sample ui files

  1. #1
    Join Date
    Mar 2009
    Location
    Hawaii
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default The Book of QT4 by Molkentin & sample ui files

    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.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: The Book of QT4 by Molkentin & sample ui files

    Hi,
    Qt Code:
    1. <?xml version="1.0" encoding="UTF-8"?>
    To copy to clipboard, switch view to plain text mode 
    should be the first line (or other encoding)

    Lykurg

  3. #3
    Join Date
    Mar 2009
    Location
    Hawaii
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: The Book of QT4 by Molkentin & sample ui files

    Quote Originally Posted by Lykurg View Post
    Hi,
    Qt Code:
    1. <?xml version="1.0" encoding="UTF-8"?>
    To copy to clipboard, switch view to plain text mode 
    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.
    Attached Files Attached Files

  4. #4
    Join Date
    Mar 2009
    Posts
    25
    Thanked 2 Times in 2 Posts

    Default Re: The Book of QT4 by Molkentin & sample ui files

    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

    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.

  5. #5
    Join Date
    Mar 2009
    Location
    Hawaii
    Posts
    6
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: The Book of QT4 by Molkentin & sample ui files

    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.

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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.