What is ~/.CFUserTextEncoding used for?

The file ~/.CFUserTextEncoding contained a string which I can't understand. It's recreated when a user log in. I had found that the result of CoreFoundation.CFStringGetSystemEncoding() is affected by the content of this file.

What is this file used for?

Thanks for the post, looks like there is an old thread about this file on the consumer apple discussions forum https://discussions.apple.com/thread/2254222?sortBy=rank

And how CFStringGetSystemEncoding works https://developer.apple.com/documentation/corefoundation/cfstringgetsystemencoding()?language=objc

https://developer.apple.com/documentation/corefoundation/cfstringgetsystemencoding()

So it look like this file is a configuration file used by macOS.

I would recommend to put your questions on the thread above.

Hope this helps.

Albert
  Worldwide Developer Relations.

Albert’s provided some good info, but I want to talk about the big picture here. Why are you asking about this?

From an API perspective, ~/.CFUserTextEncoding is an implementation detail. If you’re writing code, the location, format, and function of that file shouldn’t matter. Can you elaborate on the context which caused you to ask this question?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

What is ~/.CFUserTextEncoding used for?
 
 
Q