On Aug 21, 2008, at 4:28 PM, Maxwell, Adam R wrote: > On 08/21/08 12:34, "James Howison" <[EMAIL PROTECTED]> wrote: > >> PLOS is publishing their bibtex in utf8 (as a downloaded .bib file). >> Which is fine, if one opens the file with utf8 encoding. However >> when >> I double click it, BibDesk (1.3.18) gives the "Unable to parse string >> as BibTeX" error, which suggests editing, but not trying a different >> encoding. > > Try dropping the file on your document's main window, which I should > have > suggested to JT as well. That will force BibDesk to guess the > encoding, and > UTF-8 will be tried if the file does not have a Unicode BOM (unless > that's > changed in the last few months). Double-clicking the file only uses > your > default encoding.
Dropping the file I linked to does import the entry, but it produces a different (wrong) result (the umlauted i char is messed up) than using the open-with encoding option. >> I just wondered whether bibdesk ought to be able to assess the >> encoding of the file (TextMate seems to be able to), or whether this >> error message might suggest trying a different encoding? > > TextMate always tries UTF-8; since a file can't be misinterpreted as > UTF-8, > this is safe (BibDesk does it as well, in the case I mentioned above). > Unfortunately, to try and guess encoding when opening a BibTeX > document from > the Finder would be problematic with BibDesk's error display, among > other > things, so it has to be specified by the user. Christiaan wrote: > If you have set ASCII as the default encoding in the Files prefs, you > can change that to UTF-8. If you get a warning when opening a file > that was saved with ASCII encoding, you can safely ignore that. Yes, that works, the file now opens with a double click (and the ï char shows up properly). > BibDesk could try to guess the encoding of the file, but that would be > wrong and lying to you. With lots of bad consequences, including files > that may not save. Note that being able to open a file with a > particular encoding is no guarantee that that's the right one. And if > it isn't, you will have messed up text without knowing it, and you > probably won't be able to save the file. That's why BibDesk always > either fails or warns. Also note that, unlike TextMate, you don't > really see the plain text that's downloaded. > > Note that you can also use the Open... menu item to open a file with a > particular encoding. Perhaps the error display dialog could simply suggest "You could try opening this file with a different encoding"? The current message is: "There was a problem reading the file. Do you want to give up, edit the file to correct the errors, or keep going with everything that could be analyzed?" I suggest: "There was a problem reading the file. Do you want to give up, edit the file to correct the errors, keep going with everything that could be analyzed, or try to open the file after specifying a different encoding?" and adding an "Open With Encoding" button, which goes to the regular Open dialog box. --J ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Bibdesk-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bibdesk-users
