Am 10.03.2005 um 23:55 schrieb Christian Bogen:
Am 10.03.2005 um 23:09 schrieb Allan Odgaard:
Well, I'd add options to the GUI, which I try to keep to a minimum, I'd add code to my source base which adds complexity and requires maintenance/testing, and I'd send a signal that UTF-8 files can/should have BOM, which I really think they shouldn't.
I got curious and poked around a bit: It seems that in UTF-8 files the BOM can be harmfull (in a way) after all:
Q: Can a UTF-8 data stream contain the BOM character (in UTF-8 form)? If yes, then can I still assume the remaining UTF-8 bytes are in big-endian order?
A: Yes, UTF-8 can contain a BOM. However, it makes no difference as to the endianness of the byte stream. UTF-8 always has the same byte order. An initial BOM is only used as a signature — an indication that an otherwise unmarked text file is in UTF-8. Note that some recipients of UTF-8 encoded data do not expect a BOM. Where UTF-8 is used transparently in 8-bit environments, the use of a BOM will interfere with any protocol or file format that expects specific ASCII characters at the beginning, such as the use of "#!" of at the beginning of Unix shell scripts. [AF] & [MD]
http://www.unicode.org/faq/utf_bom.html#29
So I guess not setting it should remain the default, whether it's setting is available as an option or not. Of course allowing for manipulation of the BOM would also make it easier to remove it if necessary (in a more convenient way than transferring the file contents to a new empty file via copy & paste). But, admittedly, that's probably not an important feature ... ;-)
No, it shouldn't. But there's an external service that gives you an “Edit in TextMate…” in the services menu, it can be downloaded here: http://macromates.com/textmate/files/TextMate.service.zip
Just something that caught my attention while being happy about the TM.service: It's greyed out when I select text existing mails in Mail.app, seems to work only when composing new ones (ie. in the mail editor). Is that a bug or a feature? (I frequently grab text out of mails for further work in a text editor.)
Christian