Click here to Skip to main content
15,895,142 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: how to solve this problem(posted again) Pin
David Crow6-Sep-06 4:09
David Crow6-Sep-06 4:09 
JokeRe: how to solve this problem(posted again) Pin
Maximilien6-Sep-06 4:18
Maximilien6-Sep-06 4:18 
GeneralRe: how to solve this problem(posted again) Pin
David Crow6-Sep-06 7:50
David Crow6-Sep-06 7:50 
AnswerRe: how to solve this problem(posted again) Pin
sinbear6-Sep-06 5:11
sinbear6-Sep-06 5:11 
QuestionRe: how to solve this problem(posted again) Pin
David Crow6-Sep-06 6:19
David Crow6-Sep-06 6:19 
QuestionUnicode identification at run time - Help Pin
dharani5-Sep-06 23:26
dharani5-Sep-06 23:26 
AnswerRe: Unicode identification at run time - Help Pin
Waldermort6-Sep-06 0:36
Waldermort6-Sep-06 0:36 
AnswerRe: Unicode identification at run time - Help Pin
Mike Dimmick6-Sep-06 0:52
Mike Dimmick6-Sep-06 0:52 
If you're lucky, your Unicode text will start with a Byte-Order Mark byte sequence. If the text is UTF-16LE, it will start with the bytes 0xFF 0xFE in that order. If it is UTF-16BE, it will start with 0xFE 0xFF in that order, which will require you to swap the bytes to interpret it correctly with Windows functions. If it starts with 0xEF 0xBB 0xBF, it's UTF-8.

None of these encodings require the use of the Byte Order Mark. If it's not present, and you don't know the encoding of the string, I'm afraid the only method is to guess. Windows offers a function IsTextUnicode which can do this guesswork, but it can be fooled, with sometimes embarrassing results: see here[^] for one example.

Best practice is always to mark a protocol payload or file with the character set or encoding it was written in.

Stability. What an interesting concept. -- Chris Maunder

GeneralRe: Unicode identification at run time - Help Pin
dharani6-Sep-06 21:07
dharani6-Sep-06 21:07 
AnswerRe: Unicode identification at run time - Help Pin
Michael Dunn6-Sep-06 15:18
sitebuilderMichael Dunn6-Sep-06 15:18 
GeneralRe: Unicode identification at run time - Help Pin
dharani6-Sep-06 21:10
dharani6-Sep-06 21:10 
Questionupgrade to VS2005 Pin
si_695-Sep-06 22:55
si_695-Sep-06 22:55 
QuestionDrive Names - Please reply Pin
velayudhan_raj5-Sep-06 22:32
velayudhan_raj5-Sep-06 22:32 
AnswerRe: Drive Names - Please reply Pin
Nibu babu thomas5-Sep-06 22:55
Nibu babu thomas5-Sep-06 22:55 
GeneralRe: Drive Names - Please reply Pin
velayudhan_raj5-Sep-06 23:14
velayudhan_raj5-Sep-06 23:14 
GeneralRe: Drive Names - Please reply Pin
Nibu babu thomas5-Sep-06 23:29
Nibu babu thomas5-Sep-06 23:29 
GeneralRe: Drive Names - Please reply Pin
CraZyToLearn6-Sep-06 0:13
CraZyToLearn6-Sep-06 0:13 
GeneralRe: Drive Names - Please reply [modified] Pin
Hamid_RT6-Sep-06 0:28
Hamid_RT6-Sep-06 0:28 
QuestionRe: Drive Names - Please reply Pin
David Crow6-Sep-06 4:11
David Crow6-Sep-06 4:11 
AnswerRe: Drive Names - Please reply Pin
Hamid_RT6-Sep-06 4:27
Hamid_RT6-Sep-06 4:27 
GeneralRe: Drive Names - Please reply Pin
David Crow6-Sep-06 6:23
David Crow6-Sep-06 6:23 
GeneralRe: Drive Names - Please reply Pin
David Crow6-Sep-06 4:26
David Crow6-Sep-06 4:26 
QuestionCFile Data Removal Pin
payal3355-Sep-06 22:27
payal3355-Sep-06 22:27 
AnswerRe: CFile Data Removal Pin
ThatsAlok5-Sep-06 22:35
ThatsAlok5-Sep-06 22:35 
AnswerRe: CFile Data Removal Pin
Nibu babu thomas5-Sep-06 22:58
Nibu babu thomas5-Sep-06 22:58 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.