Separate names with a comma.
Discussion in 'Mac Programming' started by newformac, Aug 10, 2011.
can u please help me to write a unicode text file in cocoa application?
This isn't actually possible because you can't write a unicode text file. You can though write an NSString to a text file using a particular Unicode encoding. The most common encoding is UTF-8.
Check out writeToURL:atomically:encoding:error: in the NSString Class Reference. Possible encodings are listed under String Encodings in the Constants sections. For example, you write using UTF-8 by using NSUTF8StringEncoding.
Your question is impossible to answer until you tell us exactly what you mean by "unicode text file". Do you mean UTF-8, UTF-16, UTF-16LE or UTF-16BE, UTF32 or what? In other words, what exactly are you trying to achieve?
i want to write UTF-8 type text file.
Look at the methods in NSString. Check if there is one that allows you to write an NSString to a file. And see if there is one that lets you specify the encoding as well.
What, did I not post?