From c1261045fc7f890e0f8cd49bbd7265203dcfacf4 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Tue, 16 Apr 2013 13:51:33 +0200 Subject: [PATCH] Doc: default encoding set to UTF-8 in text editor UTF-8 is required by Qt 5. Change-Id: I7750b337296c8edf997d2610cca126530f737c37 Reviewed-by: Tobias Hunger --- .../editors/creator-editors-options-text.qdoc | 21 ++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/src/editors/creator-editors-options-text.qdoc b/doc/src/editors/creator-editors-options-text.qdoc index 6f1d26dd43d..27cc2827f07 100644 --- a/doc/src/editors/creator-editors-options-text.qdoc +++ b/doc/src/editors/creator-editors-options-text.qdoc @@ -79,8 +79,23 @@ \section2 File Encoding - To define the default file encoding, select the desired encoding in - \gui {Default encoding}. By default, \QC uses the file encoding - used by your system. + To define the default file encoding, select a suitable option in + \gui {Default encoding}. + + 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. */