#include <stdio.h>
#include <dos.h>
void main(int Cnt,char *Str[]){
 FILE *s,*d;
 char dos[10]={'','','','á','','','','ý','ü','æ'};
 char win[10]={'ä','ö','ü','ß','Ä','Ö','Ü','²','³','µ'},buf[8192];
 int l1,l2,r;
 if(Cnt!=2) {printf("\t ---- C O N V E R T I E R U N G S T O O L -----\n"
                    "\t Gib einen Dateinamen an!\n"
                    "\t Bsp. convert -dw text.txt\n\n"
                    "\t (C) 1997 by Dave Sun\n");return;}

 if((s=fopen(Str[2],"rb"))==NULL)      {printf("Cant' Open File");return;}
 if((d=fopen("1_2_3_._4_","wb"))==NULL){printf("Cant' Open File");return;}
 do{  r=fread(buf,1,8192,s);
      for(l1=0;l1<r;l1++)for(l2=0;l2<10;l2++)
          if(buf[l1]==win[l2]){buf[l1]=dos[l2];l2=9;}
     if(fwrite(buf,1,r,d)!=r){fclose(d);fclose(s);printf("Write Error");goto ENDE;}
 }while(r==8192);
 

 fclose(d);fclose(s);
 _dos_setfileattr(Str[2],0x20);remove(Str[1]);rename("1_2_3_._4_",Str[2]);
ENDE:}