Subj : Re: How do I string compare two strings, one Unicode and the other To : borland.public.cpp.borlandcpp From : Jogy Date : Wed Sep 28 2005 07:31 pm D wrote: > Hi, > > Can somebody tell me how to perform a string comparision of > two strings, one string is Unicode and the other a char*? > The following isn't working for me. > Am I using the correct string comparison functions? > > wchar_t* name = (wchar_t*) "fred"; > if (wcscmp(name, (wchar_t*) "fred") == 0) > { > // never enters here. > } > regards, > Duncan > > Hello, you cannot directly compare Unicode and ascii strings, you will have first to convert one of them to the other's type. Jogy .