On 05-16, Wolfgang Engelmann wrote:
> Thanks, Holger,
> that is strange: 
> The lyx file is ISO...
> [EMAIL PROTECTED]:~/PP-buch> file engelmann.lyx
> engelmann.lyx: ISO-8859 C program text

Ok, here "file" guessed correctly the encoding (ISO-8859-1) but 
then your lyx file looked a bit like C code to the libmagic
guessing (*maybe* because of an lyx-comment (#) at the beginning that is 
also used for C include headers). Heuristics are never perfect, and
I am not aware that libmagic has any implementation for specifically
recognizing lyx files but I think guessing the charset (what you needed 
here) is more reliable than guessing the file type (what you dont need 
here) ...

> But the bib file, produced by Jabref, although it is said to be set to 
> ISO-88.. by default (Options>preferences>default encoding) is UTF
> pp-plants-newz.bib: UTF-8 Unicode English text
> [EMAIL PROTECTED]:~/PP-buch/PP-chapter-bib> cd ..
> What to do??

Either use an editor (Kate was suggested by K Elo yesterday) or do 
cp pp-plants-new.bib pp-plants-new-2.bib
recode UTF-8..ISO-8859-1 pp-plants-new-2.bib

It *may* happen that if your bib file contains non ISO-8859-1
characters (say Chinese, Cyrillic or just any of the Eastern 
European latin extensions) then if I remember correctly recode will 
complain. In that case you also might want to try: 

iconv -f UTF-8 -t ISO-8859-1 -input pp-plants-new.bib 
  -c -output pp-plants-new-2.bib

where "-c" omits characters invalid in the target encoding. That of 
course is not a lossless conversion so keep the original file.

Cheers,

-- 
Holger Blasum +49-174-7313590 (gsm) GnuPG 1024D/ACDFC3B769DC1ED66B47

Reply via email to