Sir, i want to convert a NSString to CString using Unicode Encoding.
strcpy(cString, [nsString cStringUsingEncoding:NSUnicodeStringEncoding ]); (or) CFStringGetCString((CFStringRef)nsString], cString,1024, CFStringConvertNSStringEncodingToEncoding(NSUnicodeStringEncoding)); Here i am converting the String back CFStringRef str1 = CFStringCreateWithCString(NULL, cString, CFStringConvertNSStringEncodingToEncoding(NSUnicodeStringEncoding)); //kCFStringEncodingUnicode NSLog((NSString*)str1); //Testing for example if the nsString value is * **ामन** **मन** **खद then i am getting only ामन as output.* the normal conversion to NSString like [NSString stringWithCString: cString encoding: NSUnicodeStringEncoding]; also returns some crazy results. Can any one help me to solve this problem???? Thanking you Regards Sandeep A.C
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]