ALT Linux Community general discussions
 help / color / mirror / Atom feed
From: "Aleksander N. Gorohovski" <angel@feht.dgtu.donetsk.ua>
To: "ALT Linux Community" <community@altlinux.ru>
Subject: Re: [Comm] koi8-r to translit
Date: Wed, 05 Oct 2005 12:47:07 +0400
Message-ID: <op.sx5z0twehz2pp6@oc.peooc.net> (raw)
In-Reply-To: <20051005164009.35cb882d@alfa.itc.nstu.ru>

On Wed, 05 Oct 2005 13:40:09 +0400, Alexey Bayguzov wrote:

> On Wed, 05 Oct 2005 12:20:10 +0400
> "Aleksander N. Gorohovski" <angel@feht.dgtu.donetsk.ua> wrote:
>
>> On Wed, 05 Oct 2005 13:11:42 +0400, Антон Горлов wrote:
>>
>> > Aleksander N. Gorohovski пишет:
>> >
>> >>>>> Есть патч для vsftpd который меняет кодировку
>> >>>> Какой и где?
>> >>> http://www.opennet.ru/base/patch/ftp_charset_recode.txt.html
>> >> Конечно, это хорошая вещь, но это не совсем то.
>> >> Он работает когда на ftp-сервер закачивают файлы win-клиенты с
>> >> названиями
>> >> в кодировке cp1251, чтобы их трансформировать в koi8-r.
>> >> Ладно, пойду сам сочинять.
>> >
>> > если что-то хорошее сочинишь -дай знать...
>>
>> Возникла проблема:
>> пока не знаю каким эквивалентом (из сочетания английских букв)
>> заменить три следующие русские:
>> "Э"
>> "Ы"
>> "Ж"
>> Может у кого есть варианты ?
>
> Есть функция на php стырена на просторах ИНЕТА...
>
> function ru2Lat($string)
>   {
>     $rus = array(' ', 'ъ', 'ь', 'ё',  'ж',   'ц',  'ч',  'ш',  'щ',   
> 'ю',  'я');
>     $lat = array('',  '',   '', 'yo', 'zh', 'ts', 'ch', 'sh', 'sh',  
> 'yu', 'ya');
>     $string = str_replace($rus, $lat, strtolower($string));
>     $string = strtr($string,
>               "абвгдезийклмнопрстуфхыэ",
>               "abvgdezijklmnoprstufhye");
>
>     return preg_replace("/[^a-z0-9._-]/", "", $string);
>   }

Большое спасибо, кажется с буквами разобрался.

Буду пользовать ГОСТовский стандарт с http://orwell.ru/info/tliter.html.
Теперь надо "объвязку" сделать и потестировать на реальной системе.

Результат выложу в рассылке.


  reply	other threads:[~2005-10-05  8:47 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-05  6:24 Aleksander N. Gorohovski
2005-10-05  7:33 ` Alexandr O. Potapov
2005-10-05  7:39   ` Olvin
2005-10-05  6:59     ` Aleksander N. Gorohovski
2005-10-05  9:24       ` Slava Dubrovskiy
2005-10-05  8:31         ` Aleksander N. Gorohovski
2005-10-05  9:27       ` Re[2]: " Serge Skorokhodov
2005-10-05 14:27   ` Andrey Rahmatullin
2005-10-05  7:37 ` Шенцев Алексей Владимирович
2005-10-05  6:53   ` Aleksander N. Gorohovski
2005-10-05  8:01     ` Шенцев Алексей Владимирович
2005-10-05  7:27       ` Aleksander N. Gorohovski
2005-10-05  8:04   ` Pavel Serkov
2005-10-05  8:08     ` Шенцев Алексей Владимирович
2005-10-05  8:20       ` Pavel Serkov
2005-10-05  7:36         ` Aleksander N. Gorohovski
2005-10-05  9:11           ` Антон Горлов
2005-10-05  8:20             ` Aleksander N. Gorohovski
2005-10-05  9:40               ` Alexey Bayguzov
2005-10-05  8:47                 ` Aleksander N. Gorohovski [this message]
2005-10-05 10:04               ` [Comm] " Andrei Lomov
2005-10-05  9:29                 ` Aleksander N. Gorohovski
2005-10-05 21:47                   ` Vitaly Lipatov
2005-10-05 10:55               ` [Comm] " Vasya Makarov
2005-10-05 16:13               ` A.Kitouwaykin
2005-10-06 10:05               ` spider
2005-10-06  7:15             ` Aleksander N. Gorohovski
2005-10-06 20:44               ` Vasily Kolomeets
2005-10-05  8:30         ` Шенцев Алексей Владимирович
2005-10-05 10:58   ` Pavlov Konstantin
2005-10-05 11:04     ` Шенцев Алексей Владимирович
2005-10-05 11:10       ` Pavlov Konstantin
2005-10-05  8:57 ` Guest007
2005-10-05  8:09   ` Aleksander N. Gorohovski
2005-10-05 12:53   ` Sergey Shilov
2005-10-05  9:23     ` Aleksander N. Gorohovski
2005-12-20 12:02     ` Sergey Shilov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=op.sx5z0twehz2pp6@oc.peooc.net \
    --to=angel@feht.dgtu.donetsk.ua \
    --cc=community@altlinux.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git