Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 3.3.1
-
None
-
Ubuntu 14.04, 64 bit.
-
3e02f8ec2ee88af43437a736c234b2091f13cfba
Description
Consider following code:
int main() { char const str1[] = "ัะตัั"; return 0; }
"str1" initialized with some non-ascii UTF-8 string.
By default Qt Creator displays strings as Latin-1 strings, so it's displayed as gibberish (see attached screenshot "char_array_default.png").
Qt Creator has convenient feature in debugger: change variable display format to treat it specially. For string-like types it's possible to select string encoding: Latin-1, UTF-8 or UCS-4.
The issue is that for char arrays this settings changes visualization from string type to array type, see attached screenshot "char_array_as_utf8.png"
Workaround to see "char[]" types as UTF-8 strings is to add expression evaluator, where convert "char[]" type to "char *", and select encoding for it.
Attachments
For Gerrit Dashboard: QTCREATORBUG-14094 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
107909,3 | Debugger: Fix format switching for char[] | 3.4 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |