Unicode CString init from &#XXXX;&#YYYY; representation
-
Hi, I store texts in file in following unicode representation : &#XXXX;&#YYYY; This string & # 1058; & #1077; & #1089; & #1090; ,for example , means "Test" in russian. My project is built as unicode and i can successfully show this string if i do following: CString strMsg; strMsg = (unsigned short) 1058; strMsg += (unsigned short) 1077; strMsg += (unsigned short) 1089; strMsg += (unsigned short) 1090; TextOutW(....,..,..,..,strMsg,..,..); My question is : what should i do in order to init string like this : Code: CString strText = "& # 1058; & # 1077; & #1089; & #1090;"; so that it will be "treated" as unicode string ? I tried _T("& # 1058; & # 1077; & #1089; & #1090;") , but it doesn't help.. NOTE - I USED SPACES IN ABOVE POST INSIDE UNICODE STRINGS ON PURPOSE TO PREVENT THEM TO APPEAR AS RUSSIAN CHARS
-
Hi, I store texts in file in following unicode representation : &#XXXX;&#YYYY; This string & # 1058; & #1077; & #1089; & #1090; ,for example , means "Test" in russian. My project is built as unicode and i can successfully show this string if i do following: CString strMsg; strMsg = (unsigned short) 1058; strMsg += (unsigned short) 1077; strMsg += (unsigned short) 1089; strMsg += (unsigned short) 1090; TextOutW(....,..,..,..,strMsg,..,..); My question is : what should i do in order to init string like this : Code: CString strText = "& # 1058; & # 1077; & #1089; & #1090;"; so that it will be "treated" as unicode string ? I tried _T("& # 1058; & # 1077; & #1089; & #1090;") , but it doesn't help.. NOTE - I USED SPACES IN ABOVE POST INSIDE UNICODE STRINGS ON PURPOSE TO PREVENT THEM TO APPEAR AS RUSSIAN CHARS
unclear question: CString strText = "& # 1058; & # 1077; & #1089; & #1090;"; do you mean values in the string: first byte is: '&' second byte is: '#' next 2 bytes are: 1058 etc? includeh10
-
unclear question: CString strText = "& # 1058; & # 1077; & #1089; & #1090;"; do you mean values in the string: first byte is: '&' second byte is: '#' next 2 bytes are: 1058 etc? includeh10