[Qt-creator] Qt Commercial Mingw - QtCreator cannot decode my source file with UTF-8 encoding
tobias.hunger at gmail.com
Thu Apr 4 08:59:22 CEST 2013
Please note that Qt 5 assumes utf-8 encoded source files. This is the
reason why the default encoding was changed.
Detecting the right encoding is tricky, so creator will not try to do
so. I would suggest to use a tool like recode to change
the file encoding to utf-8 when switching to Qt 5. Conversion of
string constants to QStrings might not work as expected
2013/4/3 Orgad Shaneh <orgads at gmail.com>
> On Wed, Apr 3, 2013 at 10:10 PM, Pete Klemm <pete.klemm at esysr.com> wrote:
>> On 4/3/2013 1:41 PM, Orgad Shaneh wrote:
>> On Wed, Apr 3, 2013 at 8:42 PM, Pete Klemm <pete.klemm at esysr.com> wrote:
>>> I installed qt 5.0.1 commercial mingw and I now get this error
>>> when trying to edit my project:
>>> Error: Could not decode "iobrd.cpp" with "UTF-8" -encoding. Editing not
>>> This used to work with qt 4.7.4 opensource mingw.
>>> Is this possibly due to missing unicode support in the commercial release??
>>> Any thoughts??
>>> Qt-creator mailing list
>>> Qt-creator at qt-project.org
>> The default encoding was changed to UTF-8 in 2.6. See QTCREATORBUG-7420 and the actual change.
>> To fix this, open Tools -> Options -> Text Editor -> Behavior and change Default encoding to System.
>> - Orgad
>> Thanks for the reply, however I already have Tools -> Options -> Text Editor -> Behavior set to use UTF-8 as the
>> default encoding. The problem is the editor wants me to change the encoding to something other than UTF-8. If
>> I force the text file to Latin1 I am able to search and replace as in 4.8.4 and no longer get the error message.
>> When I get the error, UTF-8 is not even presented as an option for the encoding. As previously, stated this did
>> not exist in Qt Creator 2.6.0 from qt-opensource-4.8.4.
> I didn't mean setting it to UTF-8. That's the (new) default. I suggested changing it to System (the default in previous versions).
> - Orgad
> Qt-creator mailing list
> Qt-creator at qt-project.org
More information about the Qt-creator