On Wed, 2012-02-08 at 11:21 +0100, Michael Kussmaul wrote: > Hi > > I still use mime4j 0.6 because it had the attachment-name in the > BodyDescriptor (as part of the callback: public void body(BodyDescriptor > desc, InputStream stream) throws MimeException, IOException) which seems to > be removed in 0.7?
I am pretty sure it is still there. > But using the old 0.6 version I encountered, that if the filename has Umlaute > or other special characters in it, it does not fully decode the file-name, > e.g. an original filename: > > "Optimized Dällikon-Bern.gpx" > is being reported as: > =?iso-8859-1?Q?Optimized_D=E4llikon-Bern=2Egpx?= > > I was wondering what the "best practices" are to access and decode the > filename e.g. in version 0.7.2 of mime4j? Looking at your examples > "org.apache.james.mime4j.samples.tree.MessageTree" I only found how to use > the DOM API, but is this also possible using your event API? > One can certainly parse header fields inside #field(Field rawField) method either using field parsers from DOM module or using a custom parser of some sort. Personally that is how I use mime4j. Hope this helps Oleg > In any case many thanks for mime4j, it's a great library! > Michael
