First off, this is NOT a duplicate of: Turn a C string with NULL bytes into a char array , because the given answer doesn't work when the char *
's are Unicode.
I think the problem is that because I am trying to use UTF-8 encoded char *'s instead of ASCII char *'s, and the length of each character is different and thus, this doesn't work :
char *Buffer; // your null-separated strings
char *Current; // Pointer to the current string
// [...]
for (Current = Buffer; *Current; Current += strlen(Current) + 1)
printf("GetOpenFileName returned: %s\n", Current);
Does anyone have a similar solution that works on Unicode strings?
I have been banging my head on the this for over 4 hours now. C doesn't agree with me.
EDIT: I think that the problem is that the char * is now UTF-8 instead of ASCII.