![]() An action might be to transform text, show a result as HTML in a new document etc. All this functionality is written as scripts and these work with the current document, files in your project, the selection etc. ![]() Even things like the euro symbol (€) will give a problem with the older (legacy) encodings.Īnd as an extra bonus, UTF-8 is the only 8 bit encoding which is recognizable with a near 100% certainty, which means that as long as you use UTF-8, you should no longer experience opening a file and the text editor making a wrong guess about the encoding used (which can mess up the file if you then save it without noticing it).Ī final argument for UTF-8 is that TextMate is only providing the infrastructure for a lot of functionality. In addition, UTF-8 is the only encoding that can represent all the characters you can type on your Mac. uses ellipsis or curly quotes), it will only show correctly if the output is UTF-8 (unless you change Terminal’s encoding). This means that if you cat a non-ASCII file in Terminal or run a script which outputs more than ASCII (e.g. Since the file system uses UTF-8 for filenames, Terminal is set to UTF-8 by default (to have the result from e.g. UTF-8 is an ASCII compatible encoding, so using it should give no problems with existing tools such as grep, diff, ruby (the interpreter), gcc (the compiler) etc. For this reason the recommendation is to not set this or set it to Blank. On OS X the association is mainly through the file extension, which has the advantage that if you one day get a better program (!) to handle a given file type, you only need to update the association in one place, instead of changing the creator code of all your saved files. The creator code is how Classic Macs associated a file with its application. Also, the Finder will reposition the icon of the file each time you save it (which is only a problem if the file is in a folder you keep in sight). The downside is that since a new file is actually written to disk (with a new inode), you may break an alias to the file, although this happens only if you also moved the file, or will move it, since path has precedence over inodes when resolving aliases. This has the advantage that if your machine should crash while saving a file, you do not run the risk of losing the contents of both the old (last-saved) and new files. TextMate has a few options in the advanced preferences which affect how to save files.Ītomic saves mean that instead of overwriting the file, TextMate saves to a new file and once this succeeds, overwrites the old file.
0 Comments
Leave a Reply. |