VS2008 Debugger and CStrings - inconistent display
-
VS2008 unicode mfc project. Heavy use of CString variables. Other than the HMI display of text to the user, all other text is english. So, I might have something like this: CString stmp; stmp.Format(_T("%s"), _T("192.168.0")); displaying in the debugger: stmp.m_pszData ---- 192.168.0 other times, I'll get what I guess is the unicode version --- 㤱⸲㘱⸸⸰ Anyone seen this weird behavior? I can run the program multiple times, and it seems like the debugger's presentation can change. I've not found the pattern yet.
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
-
VS2008 unicode mfc project. Heavy use of CString variables. Other than the HMI display of text to the user, all other text is english. So, I might have something like this: CString stmp; stmp.Format(_T("%s"), _T("192.168.0")); displaying in the debugger: stmp.m_pszData ---- 192.168.0 other times, I'll get what I guess is the unicode version --- 㤱⸲㘱⸸⸰ Anyone seen this weird behavior? I can run the program multiple times, and it seems like the debugger's presentation can change. I've not found the pattern yet.
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759
Have you tried
%S
instead?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
-
Have you tried
%S
instead?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
Darn, someone responded before I could delete my silly post. I'm converting strings incorrectly (most of the IP work on Windows uses char and now wchar_t. So, self inflicted injury.
Charlie Gilley <italic>Stuck in a dysfunctional matrix from which I must escape... "Where liberty dwells, there is my country." B. Franklin, 1783 “They who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.” BF, 1759