|
-
April 19th, 2007, 10:15 PM
#5
Senior Member
I change the function AsciiToUnicode to:
wchar_t* ASCIIToUnicode(const char *ascii )
{
//first it would be best to discover where the '\0' is located
int i, length;
length = strlen(ascii);
for(i=0;i<length;++i)
{
if(ascii[i]=='\0')
break;
}
++i;
//now we can make the actual Unicode array
char *unicode = (char*)calloc(i,sizeof(wchar_t));
// if(unicode==NULL)
// return 1;
for(int j=0;j<i;++j)
{
unicode[j*2]=ascii[j];
unicode[j*2+1]='\0';
}
return (wchar_t*)unicode;
}
Now it prints out all, but the Cyrillic shows with hieroglyphs
Similar Threads
-
By Propaganda in forum AntiOnline's General Chit Chat
Replies: 1
Last Post: August 6th, 2003, 02:32 AM
-
By cwk9 in forum Tech Humor
Replies: 0
Last Post: February 28th, 2003, 11:38 PM
-
By lench in forum AntiOnline's General Chit Chat
Replies: 1
Last Post: December 5th, 2002, 02:49 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|