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
Forum Updated to NodeBB v4.3 + New Features

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 6 Dec 2018, 08:08 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!

    J 1 Reply Last reply 6 Dec 2018, 08:11
    0
    • P Princein
      6 Dec 2018, 08:08

      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!

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 6 Dec 2018, 08:11 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
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 6 Dec 2018, 08:11 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 6 Dec 2018, 09:57
        3
        • M mrjj
          6 Dec 2018, 08:11

          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 6 Dec 2018, 09:57 last edited by
          #4

          @mrjj Thanks, it solved!

          P 1 Reply Last reply 6 Dec 2018, 20:42
          0
          • P Princein
            6 Dec 2018, 09:57

            @mrjj Thanks, it solved!

            P Offline
            P Offline
            Pablo J. Rogina
            wrote on 6 Dec 2018, 20:42 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 7 Dec 2018, 01:03
            0
            • P Pablo J. Rogina
              6 Dec 2018, 20:42

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

              P Offline
              P Offline
              Princein
              wrote on 7 Dec 2018, 01:03 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.

              P 1 Reply Last reply 7 Dec 2018, 01:24
              0
              • P Princein
                7 Dec 2018, 01:03

                @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.

                P Offline
                P Offline
                Pablo J. Rogina
                wrote on 7 Dec 2018, 01:24 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

                1/7

                6 Dec 2018, 08:08

                • Login

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