Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to change a single Qt file to utf-8 encoding
Servers for Qt installer are currently down

How to change a single Qt file to utf-8 encoding

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 3.0k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Princein
    wrote on last edited by
    #1

    I am a new developer for Qt, when I build my project in Qt,it's show error:

    ../FUEditor/algorithm/FreeImage/CFreeImage.cpp:8:10: fatal error: UTF-16 (LE) byte order mark detected in '../FUEditor/algorithm/FreeImage/../util.h', but encoding is not supported
    #include "../util.h"
    ^
    2 warnings and 1 error generated.

    it's seem my util.h is encodeing is UTF-16 (LE), how change the util.h encoding to UTF-8,thanks a lot!

    jsulmJ 1 Reply Last reply
    0
    • P Princein

      I am a new developer for Qt, when I build my project in Qt,it's show error:

      ../FUEditor/algorithm/FreeImage/CFreeImage.cpp:8:10: fatal error: UTF-16 (LE) byte order mark detected in '../FUEditor/algorithm/FreeImage/../util.h', but encoding is not supported
      #include "../util.h"
      ^
      2 warnings and 1 error generated.

      it's seem my util.h is encodeing is UTF-16 (LE), how change the util.h encoding to UTF-8,thanks a lot!

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Princein Did you try to open the file in QtCreator, copy the content, delete the content and paste it (and save)?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        Try make new file in creator and paste the util.h content to it.
        or try online converter
        https://www.fileformat.info/convert/text/utf2utf.htm

        P 1 Reply Last reply
        3
        • mrjjM mrjj

          Hi
          Try make new file in creator and paste the util.h content to it.
          or try online converter
          https://www.fileformat.info/convert/text/utf2utf.htm

          P Offline
          P Offline
          Princein
          wrote on last edited by
          #4

          @mrjj Thanks, it solved!

          Pablo J. RoginaP 1 Reply Last reply
          0
          • P Princein

            @mrjj Thanks, it solved!

            Pablo J. RoginaP Offline
            Pablo J. RoginaP Offline
            Pablo J. Rogina
            wrote on last edited by
            #5

            @Princein if your issue is solved, please don't forget to mark your post as such! Thanks.

            Upvote the answer(s) that helped you solve the issue
            Use "Topic Tools" button to mark your post as Solved
            Add screenshots via postimage.org
            Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

            P 1 Reply Last reply
            0
            • Pablo J. RoginaP Pablo J. Rogina

              @Princein if your issue is solved, please don't forget to mark your post as such! Thanks.

              P Offline
              P Offline
              Princein
              wrote on last edited by
              #6

              @Pablo-J.-Rogina I sloved the question according @mrjj suggestiuon : Try make new file in creator and paste the util.h content to it. then it work for me.

              Pablo J. RoginaP 1 Reply Last reply
              0
              • P Princein

                @Pablo-J.-Rogina I sloved the question according @mrjj suggestiuon : Try make new file in creator and paste the util.h content to it. then it work for me.

                Pablo J. RoginaP Offline
                Pablo J. RoginaP Offline
                Pablo J. Rogina
                wrote on last edited by
                #7

                @Princein I understand you solved your issue with help from the community, so please mark your post as SOLVED. Thanks

                Upvote the answer(s) that helped you solve the issue
                Use "Topic Tools" button to mark your post as Solved
                Add screenshots via postimage.org
                Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved