forked from qt-creator/qt-creator
Doc: default encoding set to UTF-8 in text editor
UTF-8 is required by Qt 5. Change-Id: I7750b337296c8edf997d2610cca126530f737c37 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -79,8 +79,23 @@
|
|||||||
|
|
||||||
\section2 File Encoding
|
\section2 File Encoding
|
||||||
|
|
||||||
To define the default file encoding, select the desired encoding in
|
To define the default file encoding, select a suitable option in
|
||||||
\gui {Default encoding}. By default, \QC uses the file encoding
|
\gui {Default encoding}.
|
||||||
used by your system.
|
|
||||||
|
Qt 5 requires UTF-8 encoded source files, and therefore the default
|
||||||
|
encoding was changed from \gui System to \gui UTF-8 in \QC version 2.6.
|
||||||
|
Detecting the correct encoding is tricky, so \QC will not try to do so.
|
||||||
|
Instead, it displays the following error message when you try to edit a file
|
||||||
|
that is not UTF-8 encoded: \gui {Error: Could not decode "filename" with
|
||||||
|
"UTF-8"-encoding. Editing not possible.}
|
||||||
|
|
||||||
|
To resolve the issue, use a file conversion tool such as
|
||||||
|
\l{http://recode.progiciels-bpi.ca/index.html}{Recode} to convert the file
|
||||||
|
encoding to UTF-8 when developing Qt 5 applications. Otherwise, conversion
|
||||||
|
of string constants to QStrings might not work as expected.
|
||||||
|
|
||||||
|
If you develop only Qt 4 applications or other than Qt applications, you
|
||||||
|
can set other encoding options as the default encoding. Select the
|
||||||
|
\gui System option to use the file encoding used by your system.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user