Florin Andrei wrote:
>
> Pai nu dai si tu sursa pe lista? Please?... ;-)
Sursa ??, Hi,hi, daca si asta mai e sursa ...
Codurile le-am gasit prin 'pipairea' a doua documente care contineau
numai diacritice. Dupa aceea le-am gasit in romanian-tolls de la ro-kde
#include <stdio.h>
main (int argc,char *argv [])
{
FILE *f1,*f2;
char c1,c2;
char cha='\xe3';
char chs='\xba';
char chq='\xe2';
char cht='\xfe';
char chi='\xee';
char Cha='\xc3';
char Chs='\xaa';
char Chq='\xc2';
char Cht='\xde';
char Chi='\xce';
char z='\x00';
f1=fopen(argv[1],"r");
f2=fopen(argv[2],"w");
while (fread(&c1,1,1,f1))
{
fread(&c2,1,1,f1);
if (c1=='\x03' && c2=='\x01') {fwrite(&cha,1,1,f2);fwrite
(&z,1,1,f2);}
else if (c1=='\x5f' && c2=='\x01') {fwrite(&chs,1,1,f2);fwrite
(&z,1,1,f2);}
else if (c1=='\xe2' && c2=='\x00') {fwrite(&chq,1,1,f2);fwrite
(&z,1,1,f2);}
else if (c1=='\x63' && c2=='\x01') {fwrite(&cht,1,1,f2);fwrite
(&z,1,1,f2);}
else if (c1=='\xee' && c2=='\x00') {fwrite(&chi,1,1,f2);fwrite
(&z,1,1,f2);}
// else if (c1=='\x02' && c2=='\x01') {fwrite(&Cha,1,1,f2);fwrite
(&z,1,1,f2);}
else if (c1=='\x5e' && c2=='\x01') {fwrite(&Chs,1,1,f2);fwrite
(&z,1,1,f2);}
else if (c1=='\xc2' && c2=='\x00') {fwrite(&Chq,1,1,f2);fwrite
(&z,1,1,f2);}
else if (c1=='\x62' && c2=='\x01') {fwrite(&Cht,1,1,f2);fwrite
(&z,1,1,f2);}
else if (c1=='\xce' && c2=='\x00') {fwrite(&Chi,1,1,f2);fwrite
(&z,1,1,f2);}
else {
fwrite (&c1,1,1,f2);
fwrite (&c2,1,1,f2);
}
}
}
Linia comentata e pentru A~ si nu merge intotdeauna, adica ar trebui o
analiza pe fisierul .doc si nu mi-am batut capul cu asa ceva, ca nu prea
sunt propozitii care sa inceapa cu A~. (A~la de colo... da-te la o parte
.. !!)
--
+---------------------------------+-----------------------------------+
| Constantin Vasiliu | StipoSoft System Administrator |
| [EMAIL PROTECTED] | Linux Registered User #166419 |
+- tel:031/610215 ----------------+------------------ fax:031/610017 -+
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.