On Nov 9, 2011, at 13:15, Daniel Becker wrote: > > Am 08.11.2011 um 23:40 schrieb Maxwell, Adam R: > >> It's much better to have the onus on the user to determine encoding, so >> BibDesk doesn't get blamed for destroying files. > > Am 08.11.2011 um 23:40 schrieb Christiaan Hofman: > >> Don't know what you mean. How do you set the encoding of a file once and for >> all? A file has an encoding. And a (text) file can be saved with a different >> encoding. And adding some text in it saying it is in some encoding does not >> necessarily make it so. > > Dear Adam and Christaan, > > I think I didn't manage to explain what I am asking for. I'll try again: > Because I used to use Latin1 as encoding for all my LaTeX-Papers so far, I > have as default encoding in TeXShop, BibDesk (and a couple of other programs) > Latin1. This means that a file that is opened with a double-click is assumed > to be Latin1-encoded. Now I start to have more and more UTF8-encoded files, > both .tex and .bib. I agree that one really needs to be careful not mix them > up - somehow me, the user needs to be sure about the encoding and make sure > that the programs act properly. > > For .tex-files, I can help myself by writing this > > % !TEX encoding = UTF-8 Unicode > > at the beginning of the file. So I have a reminder that I am working in UTF8 > (what is not yet my default setting) and TeXShop opens the file as one that > is UTF8-encoded and also saves it like that, without me having to remember > that every time. (CopyPaste from the TeXShop help below) > > With my .bib-files, the following happens: double-click a file. If (by > accident) I double-clicked a file that is UTF8-encoded, I get warning, then > remember that I have to use the file -> open etc. menu, then remember to > select the correct encoding while opening. Sometimes it happens that I need > three attempts to finally open the file correctly in BibDesk. > > This is why I thought that being able to override the default encoding by > that > % !TEX encoding = UTF-8 Unicode > comment, per file, would be useful. I understand that their are > disadvantages. At least the Syntax > % !TEX encoding = your_encoding > is now common in TeXShop and TeXWorks > (http://code.google.com/p/texworks/wiki/TipsAndTricks#Setting_the_file_encoding_per_file) > ..... > > Just a suggestion. For me it would be fine if I had to open the .bib-file in > an editor, then had to add the comment > % !TEX encoding = UTF-8 Unicode and then had to save the file (of course > making sure the encoding is preserved while doing all this) > > Daniel >
It's not that we did not understand what you, we perfectly do. The point is that in general writing "% !TEX encoding = UTF-8 Unicode" at the beginning of a file does not make it so. Also, you could easily change the encoding of the file, e.g. using iconv or some text editor, then the comment would not change and be wrong. Your last comment in parenthesis is a perfect illustration, it should be clear that BibDesk *cannot* know whether you do this, and when you don't, you would be screwed automatically. Christiaan > >> From the TeXShop help panel: > > Finally, it is possible to set the encoding of a particular file so it will > be used regardless of the default encoding set in Preferences. For > example, if one of the first twenty lines of the source has the form > > % !TEX encoding = UTF-8 Unicode > then that source will be loaded and saved with UTF-8 Unicode encoding > regardless of the default encoding setting in preferences. To bypass this > behavior, hold down the option key while opening a file. > > There must be one space after % !TEX and one space before the equals sign; > the spaces in the name of the encoding must match the spaces in the name > listed below. The name of the encoding is the internal name used by Mac OS X. > TeXShop has an "Encoding" Macro which knows appropriate values and allows you > to set encoding by choosing from a list. Below is the list of allowed names: > > • MacOSRoman > • IsoLatin > • IsoLatin2 > • IsoLatin5 > • IsoLatin9 > • IsoLatinGreek > • Mac Central European Roman > • MacJapanese > • DOSJapanese > • SJIS_X0213 > • EUC_JP > • JISJapanese > • MacKorean > • UTF-8 Unicode > • Standard Unicode > • Mac Cyrillic > • DOS Cyrillic > • DOS Russian > • WindowsCentralEurRoman > • Windows Cyrillic > • KOI8_R > • Mac Chinese Traditional > • Mac Chinese Simplified > • DOS Chinese Traditional > • DOS Chinese Simplified > • GBK > • GB 2312 > • GB 18030 > > > > > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Save $700 by Nov 18 > Register now > http://p.sf.net/sfu/rsa-sfdev2dev1 > _______________________________________________ > Bibdesk-users mailing list > Bibdesk-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/bibdesk-users ------------------------------------------------------------------------------ RSA(R) Conference 2012 Save $700 by Nov 18 Register now http://p.sf.net/sfu/rsa-sfdev2dev1 _______________________________________________ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users