* [Comm] MIME-типы в GNOME
@ 2005-01-15 1:16 Alexey Rusakov
2005-01-15 2:20 ` Yuri N. Sedunov
0 siblings, 1 reply; 8+ messages in thread
From: Alexey Rusakov @ 2005-01-15 1:16 UTC (permalink / raw)
To: ALT Linux community list
Я опять про сабж... Есть такие файлы, которые с одной стороны, судя по
расширению, относятся ко вполне определенному приложению; с другой
стороны, судя по содержимому, эти файлы имеют вполне определенный тип,
который открывает совсем другое приложение. Типичный пример - файлы OOo,
представляющие собой zip-архивы. Есть и другие примеры.
У меня есть два файла .sxc, оба созданы, вестимо, из OpenOffice.org
Calc. Почему-то у одного из них из этих файлов MIME-тип OOo-шный
(application/sun.vnd...), а у другого - application/zip. Соответственно,
второй файл упорно стремится открываться в file-roller'е, что, конечно,
довольно забавно, но ни фига не полезно. Хочется понять, от чего зависит
определение MIME-типа и можно ли (нужно ли) влиять на это.
--
Alexey "Ktirf" Rusakov
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Comm] MIME-типы в GNOME
2005-01-15 1:16 [Comm] MIME-типы в GNOME Alexey Rusakov
@ 2005-01-15 2:20 ` Yuri N. Sedunov
2005-01-15 6:47 ` Alexey Rusakov
0 siblings, 1 reply; 8+ messages in thread
From: Yuri N. Sedunov @ 2005-01-15 2:20 UTC (permalink / raw)
To: community
[-- Attachment #1: Type: text/plain, Size: 730 bytes --]
В Сбт, 15/01/2005 в 04:16 +0300, Alexey Rusakov пишет:
> Я опять про сабж... Есть такие файлы, которые с одной стороны, судя по
> расширению, относятся ко вполне определенному приложению; с другой
> стороны, судя по содержимому, эти файлы имеют вполне определенный тип,
> который открывает совсем другое приложение. Типичный пример - файлы OOo
<skip>
Гном понятия не имеет, что с помощью НАШЕГО OO можно открывать файлы
соответствующих типов. Зато знает про гнумерик, потому-что у того в
СТАНДАРТНОМ .desktop файле есть соответствующая запись.
$ ./test-new-mime application/vnd.sun.xml.calc
Desktop files associated with application/vnd.sun.xml.calc
gnumeric.desktop
--
Yuri N. Sedunov
01/15/05 05:08:19
[-- Attachment #2: Эта часть сообщения подписана цифровой подписью --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Comm] MIME-типы в GNOME
2005-01-15 2:20 ` Yuri N. Sedunov
@ 2005-01-15 6:47 ` Alexey Rusakov
2005-01-15 7:37 ` Yuri N. Sedunov
0 siblings, 1 reply; 8+ messages in thread
From: Alexey Rusakov @ 2005-01-15 6:47 UTC (permalink / raw)
To: community
Yuri N. Sedunov wrote:
><skip>
>
>Гном понятия не имеет, что с помощью НАШЕГО OO можно открывать файлы
>соответствующих типов. Зато знает про гнумерик, потому-что у того в
>СТАНДАРТНОМ .desktop файле есть соответствующая запись.
>
>$ ./test-new-mime application/vnd.sun.xml.calc
>Desktop files associated with application/vnd.sun.xml.calc
>gnumeric.desktop
>
>
Не, вопрос относится к более ранней стадии. Открывание файлов в
зависимости от MIME-типа работает perfectly. Но один из упомянутых
файлов имеет MIME-тип application/vnd.sun.xml.calc, а другой -
application/zip. Хотя оба - обыкновенные файлы OOo Calc'а.
Я, собственно, пытаюсь понять, на каком основании у этих файлов
оказались /разные/ MIME-типы.
--
Alexey "Ktirf" Rusakov
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Comm] MIME-типы в GNOME
2005-01-15 6:47 ` Alexey Rusakov
@ 2005-01-15 7:37 ` Yuri N. Sedunov
2005-01-15 7:50 ` Вячеслав Диконов
0 siblings, 1 reply; 8+ messages in thread
From: Yuri N. Sedunov @ 2005-01-15 7:37 UTC (permalink / raw)
To: community
[-- Attachment #1: Type: text/plain, Size: 445 bytes --]
В Сбт, 15/01/2005 в 09:47 +0300, Alexey Rusakov пишет:
> Yuri N. Sedunov wrote:
>
> <skip>
> Но один из упомянутых
> файлов имеет MIME-тип application/vnd.sun.xml.calc, а другой -
> application/zip. Хотя оба - обыкновенные файлы OOo Calc'а.
> Я, собственно, пытаюсь понять, на каком основании у этих файлов
> оказались /разные/ MIME-типы.
Забавно, а что extract говорит об этом файле?
--
Yuri N. Sedunov
01/15/05 10:35:35
[-- Attachment #2: Эта часть сообщения подписана цифровой подписью --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Comm] MIME-типы в GNOME
2005-01-15 7:37 ` Yuri N. Sedunov
@ 2005-01-15 7:50 ` Вячеслав Диконов
2005-01-15 10:10 ` Alexey Rusakov
2005-01-15 10:57 ` anton
0 siblings, 2 replies; 8+ messages in thread
From: Вячеслав Диконов @ 2005-01-15 7:50 UTC (permalink / raw)
To: community
В Сбт, 15/01/2005 в 10:37 +0300, Yuri N. Sedunov пишет:
> В Сбт, 15/01/2005 в 09:47 +0300, Alexey Rusakov пишет:
> > Yuri N. Sedunov wrote:
> >
> > <skip>
> > Но один из упомянутых
> > файлов имеет MIME-тип application/vnd.sun.xml.calc, а другой -
> > application/zip. Хотя оба - обыкновенные файлы OOo Calc'а.
> > Я, собственно, пытаюсь понять, на каком основании у этих файлов
> > оказались /разные/ MIME-типы.
>
> Забавно, а что extract говорит об этом файле?
Такое регулярно повторяется. Файлы старых версий ОО опознаются как
документы, а файлы, записанные новыми версиями - как архивы.
Вместе с тем, только что созданный пустой файл в 0 байт с расширением
txt не сразу получает тип plain text, а только после насильного открытия
и правки в текстовом редакторе.
--
Вячеслав Диконов <linuxbox@degunino.net>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Comm] MIME-типы в GNOME
2005-01-15 7:50 ` Вячеслав Диконов
@ 2005-01-15 10:10 ` Alexey Rusakov
2005-01-15 10:57 ` anton
1 sibling, 0 replies; 8+ messages in thread
From: Alexey Rusakov @ 2005-01-15 10:10 UTC (permalink / raw)
To: community
Вячеслав Диконов wrote:
>Такое регулярно повторяется. Файлы старых версий ОО опознаются как документы, а файлы, записанные новыми версиями - как архивы.
>
Похоже, это мой случай. Файл, опознанный как архив, создан в версии
1.1.4, а опознанный как xml.calc - в версии 1.1.3.
Собственно, вот:
[ktirf@twilight ~/Desktop]$ extract file1.sxc
mimetype - application/x-zip
language - ru-RU
date - 2005-01-15T04:10:48
creation date - 2005-01-11T01:22:43
software - OpenOffice.org 1.1.4 (Linux)
[ktirf@twilight ~/Desktop]$ extract file2.sxc
mimetype - application/x-zip
language - ru-RU
date - 2004-12-05T23:54:09
creation date - 2004-11-10T00:05:05
software - OpenOffice.org 1.1.3 (Linux)
>Вместе с тем, только что созданный пустой файл в 0 байт с расширением
>txt не сразу получает тип plain text, а только после насильного открытия
>и правки в текстовом редакторе.
>
>
Видимо, расширение .txt ну совершенно не убеждает систему MIME-типов в
том, что это текстовый файл. Что по-своему разумно.
--
Alexey "Ktirf" Rusakov
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Comm] MIME-типы в GNOME
2005-01-15 7:50 ` Вячеслав Диконов
2005-01-15 10:10 ` Alexey Rusakov
@ 2005-01-15 10:57 ` anton
2005-01-15 11:17 ` Alexey Rusakov
1 sibling, 1 reply; 8+ messages in thread
From: anton @ 2005-01-15 10:57 UTC (permalink / raw)
To: community
В Сбт, 15/01/2005 в 10:50 +0300, Вячеслав Диконов пишет:
> > Забавно, а что extract говорит об этом файле?
> Такое регулярно повторяется. Файлы старых версий ОО опознаются как
> документы, а файлы, записанные новыми версиями - как архивы.
>
У меня еще один интересный эффект заметен.
Если файлы названы по русски и перед расширение (перед точкой) нет
пробела то они показываются как архивы. Но если поставить пробел то как
документы OO.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2005-01-15 11:17 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-15 1:16 [Comm] MIME-типы в GNOME Alexey Rusakov
2005-01-15 2:20 ` Yuri N. Sedunov
2005-01-15 6:47 ` Alexey Rusakov
2005-01-15 7:37 ` Yuri N. Sedunov
2005-01-15 7:50 ` Вячеслав Диконов
2005-01-15 10:10 ` Alexey Rusakov
2005-01-15 10:57 ` anton
2005-01-15 11:17 ` Alexey Rusakov
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