On Tuesday 25 January 2005 6:20, Johannes Wiedersich wrote: > I opened tellico, created a new bibliography, entered one entry, type > book containing the title: "Umlautetest: Äb Öb Üb bä bö bü".
Tellico's Unicode<->TeX character translation is handled by the bibtex-translation.xml file, which maps TeX strings to UTF-8 characters. One advantage of this is that the user is able to (albeit not conveniently) modify Tellico's behaviour. > Exporting this bibliography to bibtex (File --> Export --> Export to > bibtex) and saved it as test.bib. > > $test.bib=========================================================== > @comment{Generated by Tellico 0.13.1} > @book{test:bib, > title = {Umlautetest: {\"A}b Öb \"{U}b B{\"a} B{\"o} B\"{u}}, > author = {Wieders{\"o}ch, J.} > } > ==================================================================== > > Here Ä, ä and ö are handled correctly to {\"A} etc., > > Ö (capitals) is NOT changed to Bibtex/Latex conventions and I fully admit that the character map is not complete. I haven't come across a good list of unicode characters with equivalent TeX strings yet. I added those I found to be most common, mostly taken from the BibDesk application, with permission from the author. I'll add the Ö character now. I'd welcome any other additions. The XML format in bibtex-translation.xml should be self-explanatory. > both Ü and ü are leading to bibtex/latex errors: > Ü should translate to {\"U} > ü should translate to {\"u} That was a bug in the mapping. Since I've found many cases of bibtex files with the incorrect escaping, I wanted a one-to-many mapping. Unfortunately, there was bug which reversed the string list. Attached is a patch which fixes that error. It will be in the next release of Tellico. > Importing a large bibtex database, editing it in tellico and exporting > it again could potentially destroy the whole database. Ie, rendering it > unreadable by other bibtex applications. Yes and no. Yes, with the above bug with the incorrect mapping, With this patch, we'll be ok. No, concerning the Ö character, since that's not a valid bibtex character in the first place, and Tellico only replaces the strings it recognizes. > @comment-line at the beginning of the generated output file potentially > also leads to error messages in other bibtex-applications. No, the comment line is fully bibtex-compliant. All valid parsers should have no problem. Thanks for the bug report. The bibtex capabilities of Tellico don't get much exercise. Robby
Index: src/translators/bibtexhandler.cpp =================================================================== --- src/translators/bibtexhandler.cpp (revision 1049) +++ src/translators/bibtexhandler.cpp (working copy) @@ -119,7 +119,7 @@ // to represent a character in LaTex. Iterate backwards so that the first one listed // becomes the 'primary' key QString s = keyList.item(i).toElement().attribute(QString::fromLatin1("char")); - for(int j = strList.count()-1; j > -1; --j) { + for(int j = 0; j < strList.count(); ++j) { s_utf8LatexMap[s].append(strList.item(j).toElement().text()); // kdDebug() << "BibtexHandler::loadTranslationMaps - " // << s << " = " << strList.item(j).toElement().text() << endl;