Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: konvertori na kirilica?


  • Subject: Re: lug-bg: konvertori na kirilica?
  • From: skelet_bg@xxxxxxxxx (Georgi Georgiev)
  • Date: Thu, 13 Jan 2000 02:02:55 -0800 (PST)



--- Julian Stoev <stoev@xxxxxxxxxxxxxxxxx> wrote:
> Hi!
> 
> Niakoi znae li za niakoi svesten konvertor script
> ili po-dobre C programka 
> ot i na razlichnite kirilici. Po vyzmoznost da
> raboti stdin>...>stdout?
> 
> Iskam da si napravia prekodirane na e-mailovete ot
> koi8 na 1251 koeto da 
> se vika ot procmail.

Probvai tova:

------- koi8_cp1251.c ------

/*
  (c) Skelet (G. Georgiev) in terms of GNU GPL
  Convertor koi8 -> cp1251 cyrillic.
*/
#include <stdio.h>
int main()
{
 static char Map[64] = {
  0xfe, 0xe0, 0xe1, 0xf6, 0xe4, 0xe5, 0xf4, 0xe3,
  0xf5, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee,
  0xef, 0xff, 0xf0, 0xf1, 0xf2, 0xf3, 0xe6, 0xe2,
  0xfc, 0xfb, 0xe7, 0xf8, 0xfd, 0xf9, 0xf7, 0xfa,
  0xde, 0xc0, 0xc1, 0xd6, 0xc4, 0xc5, 0xd4, 0xc3,
  0xd5, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce,
  0xcf, 0xdf, 0xd0, 0xd1, 0xd2, 0xd3, 0xc6, 0xc2,
  0xdc, 0xdb, 0xc7, 0xd8, 0xdd, 0xd9, 0xd7, 0xda
 }; 
 unsigned char w;
 unsigned char First = 0xc0;
 while (!feof(stdin)) {
   w = getchar();
   if (w >= First) w = Map[w - First];
   putchar(w);
 }
 return 0;
}

---------end of file --------------

=====
Skelet
        -------- http://people.bulgaria.com/skelet
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
==================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
Otpiswaneto RABOTI !!! : Majordomo@xxxxxxxxxxxxxxxxxx UNSUBSCRIBE LUG-BG
http://www.linux-bulgaria.org/ Hosted by Internet Group Ltd. - Stara Zagora



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.