codepage of VariableWindow and GDB Session Window

Sysprogs forums Forums VisualGDB codepage of VariableWindow and GDB Session Window

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #31431
    superzmy
    Participant

    I had checked that GDB send utf-8 string to visualgdb like

    char sz[] = u8″■※”;

     

    p sz
    &”p sz\n”
    $2 = “■※”
    OK
    list
    &”list\n”
    3 using namespace std;
    4
    5 int main(int argc, char *argv[])
    6 {
    7 char sz[] = u8″■※”;
    8 cout << sz << endl; //<================= Put a breakpoint here
    9 return 0;
    10 }
    OK

    gdb raw output———————————————————————-

    &”list\n”
    ~”3\tusing namespace std;\n”
    ~”4\t\n”
    ~”5\tint main(int argc, char *argv[])\n”
    ~”6\t{\n”
    ~”7\t\tchar sz[] = u8\”\342\226\240\342\200\273\”;\n”
    ~”8\t\tcout << sz << endl;\t//<================= Put a breakpoint here\n”
    ~”9\t\treturn 0;\n”
    ~”10\t}\n”
    ^done

     

    I try to what is “■※” by notepad++, then I found it should be UTF8 byte stream shown by Latin code page

    set to Latin-1 codepage,  copy “■※” to notepad++  and change to UTF8 codepage,  we will see “■※”.

     

    so VisualGDB should show gdb stream as utf8, MultibyteToWideChars to wchar_t stream then write to GDB session window.

     

    Please make an update.

    #31433
    superzmy
    Participant

    My system is win7 with not UTF8 codepage nor Latin codepage.

    And please make an option to force any const char * in variable was shown as UTF8 codepage through MultiBytesToWideChar to wchar_t *

    #31435
    support
    Keymaster

    Hi,

    Please attach a screenshot of your Help->About VisualGDB window so that we could see what is going on.

    #31436
    superzmy
    Participant

    here it’s

    Attachments:
    You must be logged in to view attached files.
    #31438
    support
    Keymaster

    Hi,

    Thank you for attaching the screenshot. We could definitely add a setting for controlling the code page used by VisualGDB when parsing the gdb output if it was affecting one of our paid users. Please consider purchasing a license and we will be happy to add this setting.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.