Where is the character encoding stored for Terminal?

Hippo Man

Hippo Man
In the Terminal program, if I go to Preferences->Settings, there's section called International and a drop-down menu for setting the Character encoding. When I set that encoding, where does this setting get stored? I don't see it anywhere when I issue this command:
defaults read com.apple.Terminal
Nor do I see it in the [whatever].terminal file that results when I export the settings.

This character encoding info has to be stored somewhere. Do any of you know what file contains this setting?

Thanks in advance.
.​
 
Well, I found a partial answer to my question. If I export the settings and the character encoding is something other than UTF-8, the encoding shows up in the [whatever].terminal file in a key called CharacterEncoding with a numeric value (for example, ISO-8859-1 is value 5). I didn't see this in my earlier tests, because the settings I was exporting happened to have a UTF-8 encoding.

Apparently, UTF-8 is the default and it doesn't generate a CharacterEncoding key, while all the other encodings do need this key and the associated numeric value.

Do any of you know where these numeric values are defined, and what the value is for UTF-8, assuming that there is a numeric value for that encoding?

Thanks.
.​
 
Back
Top