acozz
01-17-2004, 04:41 PM
I'm using the 4.11 PDK with B69.
The Plugin Version is set to PLUGIN_API_WANTUTF8.
I'm doing this:
WCHAR artist[MAX_PATH] = {0x0000};
int succ = qcdInfo->serviceFunc(opGetArtistName, artist, MAX_PATH, -1);
succ is set to 1 so it worked. And when I look at the string it is the correct length.
But then when I do this:
char s[MAX_PATH] = {0};
qcdInfo->serviceFunc(opUCS2toUTF8, artist, (long)s, MAX_PATH);
s is filled with gibberish characters. For a 4 character artist name, I get a artist buffer filled with 2 WCHARs (seems right I think) and the s buffer is filled with 6 gibberish characters.
What am I doing wrong?
The Plugin Version is set to PLUGIN_API_WANTUTF8.
I'm doing this:
WCHAR artist[MAX_PATH] = {0x0000};
int succ = qcdInfo->serviceFunc(opGetArtistName, artist, MAX_PATH, -1);
succ is set to 1 so it worked. And when I look at the string it is the correct length.
But then when I do this:
char s[MAX_PATH] = {0};
qcdInfo->serviceFunc(opUCS2toUTF8, artist, (long)s, MAX_PATH);
s is filled with gibberish characters. For a 4 character artist name, I get a artist buffer filled with 2 WCHARs (seems right I think) and the s buffer is filled with 6 gibberish characters.
What am I doing wrong?