summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2018-11-16 14:56:38 +0100
committerKai Koehne <kai.koehne@qt.io>2018-11-28 16:06:32 +0000
commitaca05d4809c40136ed8131ad1a7db631655f1725 (patch)
tree9551a49975a67b3339d6700b4cc75b3fdb39b459
parent8aa475962de4dc818499ce111b7309dd6fcb0866 (diff)
downloadqttools-aca05d4809c40136ed8131ad1a7db631655f1725.tar.gz
doc: Improve section about source encodings & lupdate
UTF-8 is the default since quite some time, and the only alternative value that CODECFORSRC supports is UTF-16. Also, we don't support Visual Studio 2005 since ages. Change-Id: Ic03f70ea8f292668d1b59b9c9c97d21522b0720d Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
-rw-r--r--src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro5
-rw-r--r--src/linguist/linguist/doc/src/linguist-manual.qdoc21
2 files changed, 9 insertions, 17 deletions
diff --git a/src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro b/src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro
index 511bd942b..ccb27f421 100644
--- a/src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro
+++ b/src/linguist/linguist/doc/snippets/doc_src_linguist-manual.pro
@@ -60,8 +60,3 @@ TRANSLATIONS = superapp_dk.ts \
superapp_no.ts \
superapp_se.ts
#! [0]
-
-
-#! [2]
-CODECFORSRC = UTF-8
-#! [2]
diff --git a/src/linguist/linguist/doc/src/linguist-manual.qdoc b/src/linguist/linguist/doc/src/linguist-manual.qdoc
index c93515e9d..403e4652c 100644
--- a/src/linguist/linguist/doc/src/linguist-manual.qdoc
+++ b/src/linguist/linguist/doc/src/linguist-manual.qdoc
@@ -869,18 +869,15 @@
\snippet doc_src_linguist-manual.pro 0
- If your compiler uses a different encoding for its runtime
- system than for its source code and you want to use non-ASCII
- characters in string literals, you will need to set the \c
- CODECFORSRC. For example:
-
- \snippet doc_src_linguist-manual.pro 2
-
- Microsoft Visual Studio 2005 .NET appears to be the only compiler
- for which this is necessary. However, if you want to write
- portable code, we recommend that you avoid non-ASCII characters
- in your source files. You can still specify non-ASCII characters
- portably using escape sequences, for example:
+ \c lupdate expects all source code to be encoded in UTF-8 by default.
+ Files that feature a BOM (Byte Order Mark) can also be encoded in
+ UTF-16 or UTF-32. Set the qmake variable \c CODECFORSRC to
+ \c UTF-16 to parse files without a BOM as UTF-16.
+
+ Some editors, such as Visual Studio, however use a different
+ encoding by default. One way to avoid encoding issues is to limit any
+ source code to ASCII, and use escape sequences for translatable strings
+ with other characters, for example:
\snippet doc_src_linguist-manual.cpp 3