* [mdk-re] Convert DOS and Unix @ 2002-01-14 20:11 Pankratov Artem 2002-01-14 20:17 ` Serhii Hlodin 2002-01-14 23:03 ` Michael Shigorin 0 siblings, 2 replies; 19+ messages in thread From: Pankratov Artem @ 2002-01-14 20:11 UTC (permalink / raw) To: Altlinux Здраствуйте, Как можно просто сконвертировать текстовый файл между двумя кодировками Dos and Unix (кои8-р и cp866). Нужно чтобы текст набранный в Linux в Dos читался не в одну строчку (замена символов перевод строки и возврат каретки) Существует ли стандартная утилитка? Или простенький скрипт? ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-14 20:11 [mdk-re] Convert DOS and Unix Pankratov Artem @ 2002-01-14 20:17 ` Serhii Hlodin 2002-01-14 21:24 ` Serhii Hlodin 2002-01-15 12:17 ` Andriy Dobrovol's'kii 2002-01-14 23:03 ` Michael Shigorin 1 sibling, 2 replies; 19+ messages in thread From: Serhii Hlodin @ 2002-01-14 20:17 UTC (permalink / raw) To: mandrake-russian >>>>> "PA" == Pankratov Artem writes: PA> Здраствуйте, Как можно просто сконвертировать текстовый файл между PA> двумя кодировками Dos and Unix (кои8-р и cp866). Нужно чтобы текст PA> набранный в Linux в Dos читался не в одну строчку (замена символов PA> перевод строки и возврат каретки) Существует ли стандартная PA> утилитка? Или простенький скрипт? GNU Emacs не пробовал? Там и cp1251, и 866 и (с 21.1) 1125 как с "-dos" так и без него. -- With best regards, Serhii Hlodin ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-14 20:17 ` Serhii Hlodin @ 2002-01-14 21:24 ` Serhii Hlodin 2002-01-15 12:17 ` Andriy Dobrovol's'kii 1 sibling, 0 replies; 19+ messages in thread From: Serhii Hlodin @ 2002-01-14 21:24 UTC (permalink / raw) To: mandrake-russian >>>>> "SH" == Serhii Hlodin writes: SH> GNU Emacs не пробовал? Там и cp1251, и 866 и (с 21.1) 1125 как с SH> "-dos" так и без него. Да, забыл, есть еще iconv, unix2dos и dos2unix. -- With best regards, Serhii Hlodin ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-14 20:17 ` Serhii Hlodin 2002-01-14 21:24 ` Serhii Hlodin @ 2002-01-15 12:17 ` Andriy Dobrovol's'kii 2002-01-15 16:58 ` Serhii Hlodin 1 sibling, 1 reply; 19+ messages in thread From: Andriy Dobrovol's'kii @ 2002-01-15 12:17 UTC (permalink / raw) To: mandrake-russian ср1251 то там есть, да только кастрированый какой-то. :( Serhii Hlodin wrote: >>>>>>"PA" == Pankratov Artem writes: >>>>>> > > PA> Здраствуйте, Как можно просто сконвертировать текстовый файл между > PA> двумя кодировками Dos and Unix (кои8-р и cp866). Нужно чтобы текст > PA> набранный в Linux в Dos читался не в одну строчку (замена символов > PA> перевод строки и возврат каретки) Существует ли стандартная > PA> утилитка? Или простенький скрипт? > > GNU Emacs не пробовал? Там и cp1251, и 866 и (с 21.1) 1125 как с "-dos" > так и без него. > > ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-15 12:17 ` Andriy Dobrovol's'kii @ 2002-01-15 16:58 ` Serhii Hlodin 2002-01-15 17:03 ` Aleksey Novodvorsky 0 siblings, 1 reply; 19+ messages in thread From: Serhii Hlodin @ 2002-01-15 16:58 UTC (permalink / raw) To: mandrake-russian >>>>> "AD" == Andriy Dobrovol's'kii writes: AD> ср1251 то там есть, да только кастрированый какой-то. :( В смысле? И по подробней, пожалуйста. -- With best regards, Serhii Hlodin ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-15 16:58 ` Serhii Hlodin @ 2002-01-15 17:03 ` Aleksey Novodvorsky 2002-01-15 18:44 ` Andriy Dobrovol's'kii 0 siblings, 1 reply; 19+ messages in thread From: Aleksey Novodvorsky @ 2002-01-15 17:03 UTC (permalink / raw) To: mandrake-russian Serhii Hlodin wrote: > >>>>> "AD" == Andriy Dobrovol's'kii writes: > > AD> ср1251 то там есть, да только кастрированый какой-то. :( > > В смысле? И по подробней, пожалуйста. > Андрей, видимо, имел в виду отсутствие GHE_WITH_UPTURN. Rgrds, AEN ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-15 17:03 ` Aleksey Novodvorsky @ 2002-01-15 18:44 ` Andriy Dobrovol's'kii 2002-01-15 19:05 ` Aleksey Novodvorsky ` (2 more replies) 0 siblings, 3 replies; 19+ messages in thread From: Andriy Dobrovol's'kii @ 2002-01-15 18:44 UTC (permalink / raw) To: mandrake-russian Примерно так. Я впервые увидел вариант ср1251 который работает только с одним языком из полной таблицы?! А уже с украинским работать почему-то нельзя. Aleksey Novodvorsky wrote: > Serhii Hlodin wrote: > > >>>>>>>"AD" == Andriy Dobrovol's'kii writes: >>>>>>> >> AD> ср1251 то там есть, да только кастрированый какой-то. :( >> >> В смысле? И по подробней, пожалуйста. >> >> > > Андрей, видимо, имел в виду отсутствие GHE_WITH_UPTURN. > > Rgrds, AEN > > > _______________________________________________ > Mandrake-russian mailing list > Mandrake-russian@altlinux.ru > http://altlinux.ru/mailman/listinfo/mandrake-russian > > > ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-15 18:44 ` Andriy Dobrovol's'kii @ 2002-01-15 19:05 ` Aleksey Novodvorsky 2002-01-15 19:28 ` Serhii Hlodin 2002-01-16 2:52 ` Re[2]: " Maksim Otstavnov 2002-01-15 19:19 ` Serhii Hlodin 2002-01-16 16:07 ` Serhii Hlodin 2 siblings, 2 replies; 19+ messages in thread From: Aleksey Novodvorsky @ 2002-01-15 19:05 UTC (permalink / raw) To: mandrake-russian Andriy Dobrovol's'kii wrote: > Примерно так. Я впервые увидел вариант ср1251 который > работает только с одним языком из полной таблицы?! А уже с > украинским работать почему-то нельзя. Можно с сербским, македонским, беларусским. Просто потому, что они не вводили новых старых букв после принятия ISO8859-5. emacs вполне естественно предполагает, что все используемые символы стандартизованы ISO, потому создает виртуальный шрифт из все ISO* плюс иероглифы. Так как твердого Г в ISO8859-5 нет, то emacs о нем не знает. Переход на Unicode в emacs планируется, но до него еще не так близко. Когда Олег Тихонов делал первый патч украинизации emacs, то мы решили при вводе заменить твердое Г на похожее македонское (?) GJE. Ответ на вопрос, почему Украина не инициировала принятия нового стандарта ISO, в общем-то очевиден. Замечу, что Казахстан, Киргизия и Таджикистан просто не имеют стандартной (хотя бы по IANA) однобайтной кодировки. Rgrds, AEN ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-15 19:05 ` Aleksey Novodvorsky @ 2002-01-15 19:28 ` Serhii Hlodin 2002-01-15 19:42 ` Aleksey Novodvorsky 2002-01-16 2:52 ` Re[2]: " Maksim Otstavnov 1 sibling, 1 reply; 19+ messages in thread From: Serhii Hlodin @ 2002-01-15 19:28 UTC (permalink / raw) To: mandrake-russian >>>>> "AN" == Aleksey Novodvorsky writes: AN> Ответ на вопрос, почему Украина не инициировала принятия нового AN> стандарта ISO, в общем-то очевиден. Не очевиден. Просто чиновникам это до одного места, а я, попробовав написать в штаб-квартиру ISO получил ответ робота о том, чтобы связаться з ихним представителем на Украине. Попытки связаться e-mail с этим представительством к успеху не привели. Это было еще тогда, когда я написал украинизацию DocBook. Джеймс Кларк так и не включил эту поддержку ни в DSSSL, ни в jade, ни в sp. В последние два была добавлена поддержка koi8-u. -- With best regards, Serhii Hlodin ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-15 19:28 ` Serhii Hlodin @ 2002-01-15 19:42 ` Aleksey Novodvorsky 0 siblings, 0 replies; 19+ messages in thread From: Aleksey Novodvorsky @ 2002-01-15 19:42 UTC (permalink / raw) To: mandrake-russian Serhii Hlodin wrote: > >>>>> "AN" == Aleksey Novodvorsky writes: > > AN> Ответ на вопрос, почему Украина не инициировала принятия нового > AN> стандарта ISO, в общем-то очевиден. > > Не очевиден. Просто чиновникам это до одного места, Именно это я и имел в виду. Что-либо сделать в ISO без чиновников -- невозможно. В отличие, скажем, от IANA или unicode.org. > а я, попробовав > написать в штаб-квартиру ISO получил ответ робота о том, чтобы > связаться з ихним представителем на Украине. Попытки связаться e-mail с > этим представительством к успеху не привели. > > Это было еще тогда, когда я написал украинизацию DocBook. Джеймс Кларк > так и не включил эту поддержку ни в DSSSL, ни в jade, ни в sp. В > последние два была добавлена поддержка koi8-u. Сейчас, к счастью, отношение к i18n изменилось. Не у всех, конечно. Rgrds, AEN ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re[2]: [mdk-re] Convert DOS and Unix 2002-01-15 19:05 ` Aleksey Novodvorsky 2002-01-15 19:28 ` Serhii Hlodin @ 2002-01-16 2:52 ` Maksim Otstavnov 2002-01-16 12:49 ` Aleksey Novodvorsky 1 sibling, 1 reply; 19+ messages in thread From: Maksim Otstavnov @ 2002-01-16 2:52 UTC (permalink / raw) To: mandrake-russian Hello Aleksey, Tuesday, January 15, 2002, 7:21:20 PM, you wrote: AN> Замечу, что Казахстан, Киргизия и Таджикистан просто не имеют AN> стандартной (хотя бы по IANA) однобайтной кодировки. Везет им. -- -- Maksim ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-16 2:52 ` Re[2]: " Maksim Otstavnov @ 2002-01-16 12:49 ` Aleksey Novodvorsky 0 siblings, 0 replies; 19+ messages in thread From: Aleksey Novodvorsky @ 2002-01-16 12:49 UTC (permalink / raw) To: mandrake-russian Maksim Otstavnov wrote: > Hello Aleksey, > > Tuesday, January 15, 2002, 7:21:20 PM, you wrote: > > AN> Замечу, что Казахстан, Киргизия и Таджикистан просто не имеют > AN> стандартной (хотя бы по IANA) однобайтной кодировки. > > Везет им. > Не очень :-) Сайтов в Unicode там не обнаружена. Зато есть сайты, содержащие сылку на шрифты для своего просмотра. Шрифты, конечно, варезные, да еще сайтозависимые. Rgrds, AEN ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-15 18:44 ` Andriy Dobrovol's'kii 2002-01-15 19:05 ` Aleksey Novodvorsky @ 2002-01-15 19:19 ` Serhii Hlodin 2002-01-16 16:07 ` Serhii Hlodin 2 siblings, 0 replies; 19+ messages in thread From: Serhii Hlodin @ 2002-01-15 19:19 UTC (permalink / raw) To: mandrake-russian >>>>> "AD" == Andriy Dobrovol's'kii writes: AD> Примерно так. Я впервые увидел вариант ср1251 который работает AD> только с одним языком из полной таблицы?! А уже с украинским AD> работать почему-то нельзя. >>>>> "AD" == Aleksey Novodvorsky wrote: >> Андрей, видимо, имел в виду отсутствие GHE_WITH_UPTURN. Rgrds, AEN Проверю. Если действительно так -- будут новые патчи. Кстати, 866 тоже имеет одну ошибку, но я ее не исправлял по той причине, что 866 не входит в "пакет" украинизации emacs. -- With best regards, Serhii Hlodin ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-15 18:44 ` Andriy Dobrovol's'kii 2002-01-15 19:05 ` Aleksey Novodvorsky 2002-01-15 19:19 ` Serhii Hlodin @ 2002-01-16 16:07 ` Serhii Hlodin 2 siblings, 0 replies; 19+ messages in thread From: Serhii Hlodin @ 2002-01-16 16:07 UTC (permalink / raw) To: mandrake-russian >>>>> "AD" == Andriy Dobrovol's'kii writes: AD> Примерно так. Я впервые увидел вариант ср1251 который работает AD> только с одним языком из полной таблицы?! А уже с украинским AD> работать почему-то нельзя. Можно, но, как заметил Алексей, только без GHE with upturn. Все остальные буквы присутнствуют. Поменять коды в cp1251 для македонской ge не проблема, но это не выход. Буду смотреть, что можно будет сделать. -- With best regards, Serhii Hlodin ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Convert DOS and Unix 2002-01-14 20:11 [mdk-re] Convert DOS and Unix Pankratov Artem 2002-01-14 20:17 ` Serhii Hlodin @ 2002-01-14 23:03 ` Michael Shigorin 2002-01-15 12:27 ` [mdk-re] " Mikhail Zabaluev 1 sibling, 1 reply; 19+ messages in thread From: Michael Shigorin @ 2002-01-14 23:03 UTC (permalink / raw) To: Altlinux On Mon, Jan 14, 2002 at 08:04:01PM +0300, Pankratov Artem wrote: > Как можно просто сконвертировать текстовый файл между двумя кодировками > Dos and Unix (кои8-р и cp866). Нужно чтобы текст набранный в Linux > в Dos читался не в одну строчку (замена символов перевод строки и возврат > каретки) Это прекрасно решает iconv (iconv -fcp866 -tkoi8-r < dos.txt > unix.txt) > Существует ли стандартная утилитка? Или простенький скрипт? Можно tr или sed, вообще-то есть dos2unix и unix2dos, я порой использую интеграт, который сразу и кодировку (с автодетектом), и переводы строк -- но его название Вам не поможет :(( -- ---- WBR, Michael Shigorin <mike@altlinux.ru> ------ http://visa.chem.univ.kiev.ua/~mike/ ^ permalink raw reply [flat|nested] 19+ messages in thread
* [mdk-re] Re: Convert DOS and Unix 2002-01-14 23:03 ` Michael Shigorin @ 2002-01-15 12:27 ` Mikhail Zabaluev 0 siblings, 1 reply; 19+ messages in thread From: Mikhail Zabaluev @ 2002-01-15 12:27 UTC (permalink / raw) To: Altlinux Hello Michael, On Mon, Jan 14, 2002 at 09:54:37PM +0200, Michael Shigorin wrote: > > On Mon, Jan 14, 2002 at 08:04:01PM +0300, Pankratov Artem wrote: > > Как можно просто сконвертировать текстовый файл между двумя кодировками > > Dos and Unix (кои8-р и cp866). Нужно чтобы текст набранный в Linux > > в Dos читался не в одну строчку (замена символов перевод строки и возврат > > каретки) > Это прекрасно решает iconv (iconv -fcp866 -tkoi8-r < dos.txt > unix.txt) AFAIK, он не перекодирует концы строк. Утилита recode делает всё. -- Stay tuned, MhZ JID: mookid@jabber.org ___________ What is wanted is not the will to believe, but the will to find out, which is the exact opposite. -- Bertrand Russell, "Skeptical Essays", 1928 ^ permalink raw reply [flat|nested] 19+ messages in thread
[parent not found: <3C445D4A.F72A34E6@mtu-net.ru>]
* Re: [mdk-re] Re: Convert DOS and Unix @ 2002-01-16 10:28 ` Dmitry V. Levin 2002-01-16 15:54 ` Oleg N. Kayunov 2002-01-16 12:54 ` Aleksey Novodvorsky 1 sibling, 1 reply; 19+ messages in thread From: Dmitry V. Levin @ 2002-01-16 10:28 UTC (permalink / raw) To: ALT Linux Spring mailing list [-- Attachment #1: Type: text/plain, Size: 1064 bytes --] On Tue, Jan 15, 2002 at 07:48:10PM +0300, Oleg N. Kayunov wrote: > > > > Как можно просто сконвертировать текстовый файл между двумя кодировками > > > > Dos and Unix (кои8-р и cp866). Нужно чтобы текст набранный в Linux > > > > в Dos читался не в одну строчку (замена символов перевод строки и возврат > > > > каретки) > > > Это прекрасно решает iconv (iconv -fcp866 -tkoi8-r < dos.txt > > > unix.txt) > > > > AFAIK, он не перекодирует концы строк. > > > > Утилита recode делает всё. > Лично меня достали заявочки iconv о неперекодируемых символах (со > слетанием) и я сделал простую перловочку на три направления. > Обрабатывающую концы строк, ест-н-но. И зачем оно такое надо? Regards, Dmitry +-------------------------------------------------------------------------+ Dmitry V. Levin mailto://ldv@alt-linux.org ALT Linux Team http://www.altlinux.ru/ Fandra Project http://www.fandra.org/ +-------------------------------------------------------------------------+ UNIX is user friendly. It's just very selective about who its friends are. [-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --] ^ permalink raw reply [flat|nested] 19+ messages in thread
* [mdk-re] Re: Convert DOS and Unix 2002-01-16 10:28 ` Dmitry V. Levin @ 2002-01-16 15:54 ` Oleg N. Kayunov 0 siblings, 0 replies; 19+ messages in thread From: Oleg N. Kayunov @ 2002-01-16 15:54 UTC (permalink / raw) To: mandrake-russian "Dmitry V. Levin" wrote: > > On Tue, Jan 15, 2002 at 07:48:10PM +0300, Oleg N. Kayunov wrote: > > > > > Как можно просто сконвертировать текстовый файл между двумя кодировками > > > > > Dos and Unix (кои8-р и cp866). Нужно чтобы текст набранный в Linux > > > > > в Dos читался не в одну строчку (замена символов перевод строки и возврат > > > > > каретки) > > > > Это прекрасно решает iconv (iconv -fcp866 -tkoi8-r < dos.txt > > > > unix.txt) > > > > > > AFAIK, он не перекодирует концы строк. > > > > > > Утилита recode делает всё. > > Лично меня достали заявочки iconv о неперекодируемых символах (со > > слетанием) и я сделал простую перловочку на три направления. > > Обрабатывающую концы строк, ест-н-но. > > И зачем оно такое надо? 1) Чтоб не доставало (см. выше). 2) Для простоты: чтоб вспоминать всякий раз в каком регистре надо и какими подчеркиваниями/дефисами писать имена кодировок (по жизни мне почти каждый раз требовалось выводить список кодировок для iconv або лезть в книжечку) ибо довольно редко пользуюсь и не запоминается. 3) Если б не случилось 1), то я б все едино загнал бы iconv в 3-х направленный shell-скрипт, в силу 2). 4) IMHO автору первоначального письма что-то именно в этом роде и нужно. > Другой вариант : iconv --help на предмет -r Если они (несоответствующие символы) вообще никак не заменяются, то потом легче сообразить (по тексту), на что их собственно лучше заменить. Их ведь не один. Я же не говорю, что iconv - не нужна (при ее-то богатстве возможностей). В частности, строчки для трансляции, что в скрипте, я именно ей и делал, помнится. :-) > Regards, > Dmitry > -- Best regards, Oleg N. Kayunov. ^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [mdk-re] Re: Convert DOS and Unix 2002-01-16 10:28 ` Dmitry V. Levin @ 2002-01-16 12:54 ` Aleksey Novodvorsky 1 sibling, 0 replies; 19+ messages in thread From: Aleksey Novodvorsky @ 2002-01-16 12:54 UTC (permalink / raw) To: mandrake-russian "Oleg N. Kayunov" wrote: > Mikhail Zabaluev wrote: > > > > Hello Michael, > > > > On Mon, Jan 14, 2002 at 09:54:37PM +0200, Michael Shigorin wrote: > > > > > > On Mon, Jan 14, 2002 at 08:04:01PM +0300, Pankratov Artem wrote: > > > > Как можно просто сконвертировать текстовый файл между двумя кодировками > > > > Dos and Unix (кои8-р и cp866). Нужно чтобы текст набранный в Linux > > > > в Dos читался не в одну строчку (замена символов перевод строки и возврат > > > > каретки) > > > Это прекрасно решает iconv (iconv -fcp866 -tkoi8-r < dos.txt > > > unix.txt) > > > > AFAIK, он не перекодирует концы строк. > > > > Утилита recode делает всё. > Лично меня достали заявочки iconv о неперекодируемых символах (со > слетанием) и я сделал простую перловочку на три направления. > Обрабатывающую концы строк, ест-н-но. > Прилагаю в zip-е (во избежание почтовых перекодировок). > Другой вариант : iconv --help на предмет -r Rgrds, AEN ^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2002-01-16 16:07 UTC | newest] Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-01-14 20:11 [mdk-re] Convert DOS and Unix Pankratov Artem 2002-01-14 20:17 ` Serhii Hlodin 2002-01-14 21:24 ` Serhii Hlodin 2002-01-15 12:17 ` Andriy Dobrovol's'kii 2002-01-15 16:58 ` Serhii Hlodin 2002-01-15 17:03 ` Aleksey Novodvorsky 2002-01-15 18:44 ` Andriy Dobrovol's'kii 2002-01-15 19:05 ` Aleksey Novodvorsky 2002-01-15 19:28 ` Serhii Hlodin 2002-01-15 19:42 ` Aleksey Novodvorsky 2002-01-16 2:52 ` Re[2]: " Maksim Otstavnov 2002-01-16 12:49 ` Aleksey Novodvorsky 2002-01-15 19:19 ` Serhii Hlodin 2002-01-16 16:07 ` Serhii Hlodin 2002-01-14 23:03 ` Michael Shigorin 2002-01-15 12:27 ` [mdk-re] " Mikhail Zabaluev 2002-01-16 10:28 ` Dmitry V. Levin 2002-01-16 15:54 ` Oleg N. Kayunov 2002-01-16 12:54 ` Aleksey Novodvorsky
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