<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div><div><div><blockquote type="cite"><div><blockquote type="cite">I understand the problem now. However, how come TextMate can detect what encoding was used for a file, and the scanner can not ?</blockquote></div><div> </div><div>TextMate can *not* detect the encoding of your files. If you use UTF- n encoding, there is a 99.9999…% chance that it will get it right, but *any* other encoding, and TM’s guess is based on a frequency table and how well your file corresponds to this distribution when interpreted in the various encodings.</div></blockquote></div><div>The problem with TextMate is that it essentially forces people to use UTF8. I have yet to find a way how to teach TextMate that my default encoding is Latin1 (even though this is the default encoding which I have set in the prefs): as long as a TeX file doesn't contain any special characters, it will automatically assume they are UTF8 files (ignoring my preference and -- if existant -- the metadata connected to that file). </div><div><br class="webkit-block-placeholder"></div><div><blockquote type="cite">So anything else than mandating UTF-8 will make things break, and there is no technical solution to this problem. Sure, you can have things work “good enough” for some w/o going 100% UTF-8, and you can maybe fix some of the stuff that breaks when you are not using UTF-8, but you can never fix it all, so IMO it’s really not worth trying to support more than UTF-8, UTF-8 is the solution to the encoding problems of the past.</blockquote></div><div>However, going UTF8 is sometimes just not an option. I frequently exchange files with people who work on Windows, Linux or Solaris and the standard encoding they use is usually Latin1. Yes, there are ways how to use UTF8 on other OS, but have you ever tried to convince someone to switch to UTF8 who still writes his papers in Plain TeX? </div><div><br class="webkit-block-placeholder"></div><div>Instead of blindly arguing for people to convert to UTF8 (which is what I would use if I got to choose), you should accept that people (= customers) want to and sometimes need to work with other encodings as well. </div><div><br class="webkit-block-placeholder"></div><div>I'm still longing for an `encoding per project' option which TextMate would stick to no matter what. And also an error message that tells me that I cannot save my .tex file in Latin1 because there are some (invisible) characters that prevent it from doing so (right now, it'll just revert to UTF8 without telling me). </div><div><br></div><div>Max</div></div></div><br><br><div><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div><br></div><div>UC Berkeley</div>Department of Physics</span></span></span></span></div></body></html>