Click here to Skip to main content
15,909,530 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: unicode strings Pin
Justin Tay26-Aug-06 10:08
Justin Tay26-Aug-06 10:08 
L"" is not a macro, it's simply a means of indicating a unicode string literal. ie. whatever is within it has to be a valid unicode string. If you're specifying a MBCS string literal then it's within your unicode build that you have to do the conversion from MBCS (specifying the codepage the string is in) to unicode.

You should also consider what happens if for the MBCS build, the user is not running with the codepage that the MBCS string is in. (MBCS strings are all codepage specific). So what happens then? Converting your MBCS string to unicode and then back to the user's current codepage would probably fail (being unable to do the mappings), and using that MBCS string ignoring the user's current codepage is very wrong and might represent invalid file path characters on that user's codepage.

If you are using VC7 and up, you should use the new ATL conversion classes[^]instead though there are some differences.
AnswerRe: unicode strings Pin
Mike Dimmick26-Aug-06 10:51
Mike Dimmick26-Aug-06 10:51 
GeneralRe: unicode strings Pin
Waldermort26-Aug-06 11:02
Waldermort26-Aug-06 11:02 
AnswerRe: unicode strings Pin
Michael Dunn26-Aug-06 21:37
sitebuilderMichael Dunn26-Aug-06 21:37 
GeneralRe: unicode strings Pin
Waldermort26-Aug-06 22:19
Waldermort26-Aug-06 22:19 
GeneralRe: unicode strings Pin
Michael Dunn26-Aug-06 22:52
sitebuilderMichael Dunn26-Aug-06 22:52 
QuestionLinked list of strings - how to? Pin
jon-8026-Aug-06 4:22
professionaljon-8026-Aug-06 4:22 
AnswerRe: Linked list of strings - how to? [modified] Pin
Dave Calkins26-Aug-06 5:39
Dave Calkins26-Aug-06 5:39 
GeneralRe: Linked list of strings - how to? Pin
jon-8026-Aug-06 7:32
professionaljon-8026-Aug-06 7:32 
AnswerRe: Linked list of strings - how to? Pin
David Crow28-Aug-06 4:33
David Crow28-Aug-06 4:33 
Questionfloat to string Pin
Waldermort26-Aug-06 3:46
Waldermort26-Aug-06 3:46 
AnswerRe: float to string Pin
Mike Dimmick26-Aug-06 9:25
Mike Dimmick26-Aug-06 9:25 
QuestionHooking up Direct3D... but which one ? Pin
seq-26-Aug-06 3:45
seq-26-Aug-06 3:45 
AnswerRe: Hooking up Direct3D... but which one ? Pin
Andy Moore27-Aug-06 10:14
Andy Moore27-Aug-06 10:14 
GeneralRe: Hooking up Direct3D... but which one ? Pin
seq-27-Aug-06 10:49
seq-27-Aug-06 10:49 
QuestionUsing mouse scroll Pin
xkrja26-Aug-06 2:54
xkrja26-Aug-06 2:54 
AnswerRe: Using mouse scroll Pin
Waldermort27-Aug-06 0:34
Waldermort27-Aug-06 0:34 
QuestionNo default constructor Pin
#realJSOP26-Aug-06 1:25
professional#realJSOP26-Aug-06 1:25 
AnswerRe: No default constructor [modified] Pin
Garth J Lancaster26-Aug-06 1:40
professionalGarth J Lancaster26-Aug-06 1:40 
AnswerRe: No default constructor Pin
Stephen Hewitt26-Aug-06 2:50
Stephen Hewitt26-Aug-06 2:50 
AnswerRe: No default constructor Pin
cmk26-Aug-06 7:14
cmk26-Aug-06 7:14 
Questionproblem on changing the views Pin
radhika2826-Aug-06 0:48
radhika2826-Aug-06 0:48 
AnswerRe: problem on changing the views Pin
radhika2826-Aug-06 2:18
radhika2826-Aug-06 2:18 
Questiondirectory access Pin
George_George25-Aug-06 23:00
George_George25-Aug-06 23:00 
AnswerRe: directory access Pin
eusto26-Aug-06 0:05
eusto26-Aug-06 0:05 

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.