On 14/10/2005, at 21.50, Ed Wong wrote:
I close the file and reopen it. It's not opening in ISO-8859-1. Does Text Mate reopen all files in UTF-8 event though ISO-8859-1 is specified in Preferences or the file was save as ISO-8859-1?
If you save a file w/o 8 bit characters it is saved as ASCII, no matter what encoding you specify.
TextMate will then open it as ASCII, and if you enter non-ASCII characters and save it again, it will “upgrade” it to utf-8, unless you've set the preferences to something else AND checked that this should apply to existing files as well AND the encoding you've specified can actually represent the characters in the buffer -- otherwise this choice is only honered when the file is encoding less, so to speak (i.e. for new buffers).
That said, you really really should be using utf-8. utf-8 is also the only encoding that TM can safely recognize, since text files do not specify encodings, but utf-8 is made in such a way that statistically you just don't get a false positive for that encoding -- not to mention that all the other 8 bit encodings are lossy and can't represent all the characters you can type.