Welcome to Soft32 Linux Forums!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

application/x-gettext mime type and PO files

 
   Soft32 Home -> Linux -> i18n RSS
Next:  Bug#513635: nss-ldap timeout=0 by default caused ..  
Author Message
Jens Seidel

External


Since: Nov 19, 2006
Posts: 123



(Msg. 1) Posted: Tue Mar 31, 2009 1:20 pm
Post subject: application/x-gettext mime type and PO files
Archived from groups: linux>debian>maint>i18n (more info?)

Hi,

some email clients use per default a mime type of application/x-gettext for
attached PO files.

I had in the past trouble reading these attachments in mutt inline and was
forced to either change the mime type to text/plain or to save the file
first. This problem may exist in other clients as well.

Now I found a setting which seems to work for me to display PO files inline
and I want to share it with you:

Just add to ~/.mailcap:

# this changes the line "charset=" to the current locale setting but apart
# from this it displays the PO file in the proper encoding!

application/x-gettext; msgcat --to-code=$(eval `locale` && echo $LC_CTYPE |
cut -d. -f2-) %s; needsterminal; copiousoutput;

(all in one line).

Also possible would be

application/x-gettext; iconv -c -f %{charset} %s; needsterminal; copiousoutput;

but some mail clients don't set the encoding of the attachment in the mime
type which results in missing/skipped 8 bit characters.

I failed to use iconv and to extract the encoding from the PO file itself
without writing an external script. Inline code I tested (already simplified):

application/x-gettext; iconv -f iso-8859-1 %s; needsterminal;
copiousoutput; test=grep --quiet -i 'Content-Type:.*charset=.*iso-8859' %s

Jens


--
To UNSUBSCRIBE, email to debian-i18n-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Anyone know where are the mime type associations kept? - Does anyone know the files I can edit manually to change the mime association so I can open media files by clicking on....

application/octet-stream in mime.types a comment # appears - Hi people, I want to send "raw" data to a printer in RedHat Linux AS 4. We have cups-1.1.22-0.rc1.9.11 I fo...

mime-type: octet-stream lässt_sich_nicht_ - Hi, ich benutze Suse 9.1 pro und hatte dieses Problem schon einmal und es auch schon gelöst. Wenn ich den Konqueror..

[gentoo-user] mime type experts / *.pps - Hi folks, this is about Powerpoint Presentations and Gentoo and (almost) any other linux distribution. There are two....

[gentoo-user] KBabel cannot find a corresponding plugin fo.. - I just emerged kde-base/kbabel-3.5.2 and whenever I try to open a po-file with it I get a KMessageBox saying: ..

[gentoo-user] Can't open any files/mime-types? - Hi list, when trying to open any file with k3b or e.g. openoffice, a box tells me "could not find mime type ..
       Soft32 Home -> Linux -> i18n All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Categories:
 Windows
  Linux
 Mac
 PDA


[ Contact us | Terms of Service/Privacy Policy ]