FileName decode

Hi techies,
I am getting file path from the session to the frontend.Here is the path
d:sunApplicationServer[]inshow.xml.
But actual path is d:\sunApplciationServer\bin\show.xml.
can u guys tell me why this path has changed when it comes to front end i.e jsp
regards,
krish

Here is my code.
String xmlFileName = request.getParameter("xmlFileName");
          System.out.println("xmlFileName"+xmlFileName);
        //session.setAttribute("xmlFile",xmlFileName);
          File f = new File(xmlFileName);
          String filePath = f.getAbsolutePath();
          System.out.println("xmlFilePath"+filePath);
          session.setAttribute("xmlFile",f.getAbsoluteFile());Plz help me out in fixing this problem??

Similar Messages

  • Encfs filename decoding error (mounting works, mountpoint is empty)

    Hi!
    a fairly large (1.9 GB) encfs-encrypted directory of mine stopped working some time ago, and I am hoping someone here can help me regain access to the data.
    This is the situation:
    – The directory can still be mounted, but the mount directory appears empty.
    – The encrypted data seems to be intact: There is a ".encfs6.xml" and a hierarchy of gibberish-named files and folders, which amount to 1.9 GB altogether.
    – I can still write to the directory. (I. e. if I mount the dir, create file with "touch <file>", unmount, and remount again, the newly created file is still there.)
    – When I run encfs with the "-vf" options, I see these error messages:
    20:42:00 (DirNode.cpp:132) error decoding filename: be1k7L8fVkv63EsbHLLxoJtY
    20:42:00 (DirNode.cpp:132) error decoding filename: .encfs6.xml
    – When I do "ls" on the dir, the command works, while "encfs -vf" says:
    20:57:09 (encfs.cpp:92) getxattr /home/carlos/mnt/ssh/morrigan/home/carlos/gemein/encfs/eZAORCDpP7ZyvSscCPZLuUwI
    20:57:09 (encfs.cpp:99) getxattr error: Operation not supported
    The full output of "encfs -vf" is quoted below. You may notice the the encrypted data is accessed through an sshfs mount. This is not the present source of the problem, as I can reproduce it directly on the server. It may, however, be its origin: The data could have been corrupted by a network interruption (or so I imagine).
    There is a similar problem report on askubuntu. It is even from around the same time when it hit me (roughly two months ago):
    http://askubuntu.com/questions/360847/e … g-the-data
    Also, there apparently was a bug in the boost libraries in 2010 which produced similar errors (among others), but which does not seem to be connected in any way:
    https://bbs.archlinux.org/viewtopic.php?id=92209
    Any ideas?
    $ encfs -vf /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/ /home/carlos/.gemein/encfs/
    21:03:07 (main.cpp:523) Root directory: /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:03:07 (main.cpp:524) Fuse arguments: (fg) (threaded) (keyCheck) encfs /home/carlos/.gemein/encfs/ -f -s -o use_ino -o default_permissions
    21:03:07 (FileUtils.cpp:177) version = 20
    21:03:07 (FileUtils.cpp:181) found new serialization format
    21:03:07 (FileUtils.cpp:199) subVersion = 20100713
    21:03:07 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
    21:03:07 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16
    21:03:07 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
    21:03:07 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16
    21:03:07 (FileUtils.cpp:1620) useStdin: 0
    EncFS Password:
    21:03:20 (Interface.cpp:165) checking if ssl/aes(3:0:2) implements ssl/aes(3:0:0)
    21:03:20 (SSL_Cipher.cpp:370) allocated cipher ssl/aes, keySize 24, ivlength 16
    21:03:21 (FileUtils.cpp:1628) cipher key size = 44
    21:03:21 (Interface.cpp:165) checking if nameio/block(3:0:1) implements nameio/block(3:0:0)
    21:03:28 (DirNode.cpp:770) created FileNode for /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:03:28 (encfs.cpp:134) getattr /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:03:39 (DirNode.cpp:770) created FileNode for /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:03:39 (encfs.cpp:134) getattr /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:06:40 (DirNode.cpp:770) created FileNode for /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:06:40 (encfs.cpp:134) getattr /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:06:40 (DirNode.cpp:770) created FileNode for /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:06:40 (encfs.cpp:134) getattr /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:06:41 (encfs.cpp:213) getdir on /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:06:41 (BlockNameIO.cpp:185) padding, _bx, finalSize = 139, 16, -123
    21:06:41 (DirNode.cpp:132) error decoding filename: be1k7L8fVkv63EsbHLLxoJtY
    21:06:41 (DirNode.cpp:132) error decoding filename: .encfs6.xml
    21:06:41 (DirNode.cpp:770) created FileNode for /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:06:41 (encfs.cpp:134) getattr /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/
    21:06:41 (DirNode.cpp:770) created FileNode for /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/eZAORCDpP7ZyvSscCPZLuUwI
    21:06:41 (encfs.cpp:134) getattr /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/eZAORCDpP7ZyvSscCPZLuUwI
    21:06:41 (encfs.cpp:92) getxattr /home/carlos/mnt/ssh/server/home/carlos/gemein/encfs/eZAORCDpP7ZyvSscCPZLuUwI
    21:06:41 (encfs.cpp:99) getxattr error: Operation not supported
    Edit: I have by now resigned myself to the fact that the file .encfs6.xml must have been corrupted somehow, which means that the data are unrecoverably lost. Lesson learned: Backups are extra-important for encrypted data!
    Last edited by Franek (2014-03-03 21:14:16)

    You can implement this by writing the module to throw an exception or whatever method you want to execute.
    If you don't want to receive an error message then module is suitable for you.
    Gaurav Jain

  • [Solved] [ntfs-3g] Filename decoding failed: Invalid or incomplete...

    ..multibyte or wide character. I have this message pop up every few minutes in my journal.
    ntfs-3g is up to date, 2014.2.15-1
    /mnt is where every ntfs drive is mounted, searching for this inode gives me
    $ find /mnt/ -inum 378576
    /mnt/winsys/Windows/servicing/Packages/Package_184_for_KB2994290~31bf3856ad364e35~amd64~~6.3.1.3.cat
    /mnt/winsys/Windows/System32/catroot/{F750E6C3-38EE-11D1-85E5-00C04FC295EE}/Package_184_for_KB2994290~31bf3856ad364e35~amd64~~6.3.1.3.cat
    /mnt/winsys/Windows/WinSxS/Catalogs/6e717cab8a384f3ddad041ba1bf0bf956d38cb7a6d4f0482f253439fc11ae49d.cat
    volumes are mounted with defaults + uuid and user-mountable
    UUID=DEEA3A44EA3A196B /mnt/winsys ntfs-3g uuid=myuser,gid=users 0 0
    How can I fix that?
    Last edited by Soukyuu (2015-03-27 21:46:58)

    Soukyuu wrote:If I run the search on /mnt/windata, I can see the inode error appear almost instantly.
    Could it be that 'find' can't show the file affected because of the error?
    That is possible. If windows thinks(1) there is no problem then my guess would be a filename with "uncommon" characters or violating some restriction. If reasonably feasable you could try keeping an eye on the output of dmesg while you use ls to list the contents of the directories on your windata partition, when you try to list the directory with the offending file(s) you should see errors. Then go to windows and rename the files if possible.
    You might want to ask about this on the ntfs-3g mailing list, maybe you have caught some bug or corner case, and you might get some tips on how to deal with this.
    (1) Windows is (or used to be) idiosyncratic, you have a set of restrictions on filenames, and usually you can't directly create files that violate the restrictions, however some programs may be able to get around those restrictions and create files that you will not be able to deal with via explorer, this might be one of those cases. If I'm not mistaken this has happened to me a few times (when I still used Windows regularly - WinXP days) and at the time checkdisk would say everything was fine but explorer would refuse to rename, move or delete the files. The workaround was to delete/rename the file with the program that created it, in one case it was winrar (the problem that time was a filename too long).

  • How to use decode for this

    Hi All
    I have one table called agreementproductkey and some columns namely Agreementproductid, keytext, fliename etc.
    There is some condition if agreement product id in not null and keytext field and fileaname field is null then i need to display the value as "NO FILE"
    This what i tried
    select decode(keytext || ' | ' || filename,null,'No File',keytext || filename) display_value, id return_value
    from agreementproductkey
    where agreementproductid = 3173
    But i didnt get the NO FILE when key text field and filename field is null for this agreementproductid.
    Thanks & Regards
    Srikkanth.M

    Hi Srikkanth,
    In the decode part, you have concatenated keytext and filename using '|' due to which it will never evaluate to null, and hence 'NOFILE' will never be displayed. CASE is a better option instead of DECODE.
    SQL> CREATE TABLE t (agreementid NUMBER, keytext VARCHAR2(10), filename VARCHAR2(10));
    Table created
    SQL> INSERT INTO t VALUES (123, 'ABC', 'ABCFile');
    1 row inserted
    SQL> INSERT INTO t VALUES (123, NULL, 'XYZFile');
    1 row inserted
    SQL> INSERT INTO t VALUES (123, 'PQR', NULL);
    1 row inserted
    SQL> INSERT INTO t VALUES (123, NULL, NULL);
    1 row inserted
    SQL> SELECT agreementid, keytext, filename,
      2         DECODE(agreementid, NULL, 'AGREEMENT NULL', DECODE(keytext || filename, NULL, 'NO FILE', 'FILE PRESENT'))
      3    FROM t;
    AGREEMENTID KEYTEXT    FILENAME   DECODE(AGREEMENTID,NULL,'AGREE
            123 ABC        ABCFile    FILE PRESENT
            123            XYZFile    FILE PRESENT
            123 PQR                   FILE PRESENT
            123                       NO FILE
    SQL> Regards
    Ameya

  • After saved to computer, Adobe Reader could not open 'filename.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).

    After saved to computer, Adobe Reader could not open 'filename.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded).

    What is your operating system?  Reader version?
    Saved from where?  What is the file size of the saved document?

  • Wrong decoded filenames of attachments

    Hi,
    sometimes i receive mails from windows users where the filenames of the attachments are not decoded correct. It seems that apple mail does not handle filenames encoded like this wrong:
    Content-Type: application/vnd.ms-excel;
    name="=?iso-8859-15?Q?Industrieprojekt=FCbersicht=5FWagner_20071207=2Exls?="
    Content-transfer-encoding: base64
    Content-Disposition: attachment;
    filename="=?iso-8859-15?Q?Industrieprojekt=FCbersicht=5FWagner_20071207=2Exls?= "
    other mailer have no problems with this (kmail,mutt,firebird,outlook)
    Is there any way to handle this attachments without giving them a new name manually?
    Thanks
    Olaf

    Hmm.. guess apple does not want a way for us to view the list of attachments.
    guess will have to switch my customer over to thunderbird
    Message was edited by: T Poulter

  • GIF decoding from stream

    In the table are stored GIF and JPEG images, which can be edited by the user, and then to be written back. Here the code, which handles JPEG-images:
    OraclePreparedStatement pstmt = (OraclePreparedStatement) conn.prepareStatement (
    " SELECT mime _ type, content FROM wwv _ document $ WHERE name =? "
    Pstmt.setString (1, sourceImage);
    OracleResultSet rs = (OracleResultSet) pstmt.executeQuery ();
    If (rs.next ()) {
    String imageType = rs.getString (1);
    If (imageType.endsWith (" jpeg ")) {// decoding jpeg image
    InputStream in = rs.getBinaryStream (2);
    ByteArrayOutputStream out = new ByteArrayOutputStream ();
    JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder (in);
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder (out);
    BufferedImage sourceImg = decoder.decodeAsBufferedImage ();
    // Processing an image
    BufferedImage img=makeSomeWork(sourceImg);
    encoder.encode (img);
    // Recording an image
    Question: that it is necessary to write instead of lines
    JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder (in);
    JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder (out);
    to work with GIF-images?
    Thanks.

    hi,
    there is Java Advance Imaging JAI which can do a lot more for graphic.
    JAI Home page http://java.sun.com/products/java-media/jai/index.html
    here are jars :
    c:\jdk\lib\jai_codec.jar;
    c:\jdk\lib\jai_core.jar;
    c:\jdk\lib\mlibwrapper_jai.jar
    here is example demo from JAI demos.
    * @(#)FormatDemo.java     12.2 01/09/21
    * Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions are met:
    * -Redistributions of source code must retain the above copyright notice, this
    * list of conditions and the following disclaimer.
    * -Redistribution in binary form must reproduct the above copyright notice,
    * this list of conditions and the following disclaimer in the documentation
    * and/or other materials provided with the distribution.
    * Neither the name of Sun Microsystems, Inc. or the names of contributors may
    * be used to endorse or promote products derived from this software without
    * specific prior written permission.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * You acknowledge that Software is not designed,licensed or intended for use in
    * the design, construction, operation or maintenance of any nuclear facility.
    import com.sun.media.jai.codec.FileSeekableStream;
    import com.sun.media.jai.codec.ImageCodec;
    import com.sun.media.jai.codec.SeekableStream;
    public class FormatDemo {
    public static void main(String[] args) {
    if (args.length < 1) {
    System.out.println(
    "Format recognizer demo:\n");
    System.out.println(
    " Given a file, determine which file formats it may be encoded in.");
    System.out.println(
    " In addition to the standard formats, a \"samplepnm\" codec is");
    System.out.println(
    " registered.\n");
    System.out.println("usage: java FormatDemo <filenames>");
    System.exit(0);
    // Register the sample PNM codec
    ImageCodec.registerCodec(new SamplePNMCodec());
    try {
    for (int i = 0; i < args.length; i++) {
    SeekableStream stream = new FileSeekableStream(args);
    String[] names = ImageCodec.getDecoderNames(stream);
    System.out.println("File " +
    args[i] +
    " may be in the following format(s):");
    for (int j = 0; j < names.length; j++) {
    System.out.println("\t" + names[j]);
    System.out.println();
    } catch (Exception e) {
    e.printStackTrace();
    here is the required helper class to run the above program.
    * @(#)SamplePNMCodec.java     12.2 01/09/21
    * Copyright (c) 2001 Sun Microsystems, Inc. All Rights Reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions are met:
    * -Redistributions of source code must retain the above copyright notice, this
    * list of conditions and the following disclaimer.
    * -Redistribution in binary form must reproduct the above copyright notice,
    * this list of conditions and the following disclaimer in the documentation
    * and/or other materials provided with the distribution.
    * Neither the name of Sun Microsystems, Inc. or the names of contributors may
    * be used to endorse or promote products derived from this software without
    * specific prior written permission.
    * This software is provided "AS IS," without a warranty of any kind. ALL
    * EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY
    * IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
    * NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE
    * LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING
    * OR DISTRIBUTING THE SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS
    * LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT,
    * INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
    * CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF
    * OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE
    * POSSIBILITY OF SUCH DAMAGES.
    * You acknowledge that Software is not designed,licensed or intended for use in
    * the design, construction, operation or maintenance of any nuclear facility.
    import java.awt.image.DataBuffer;
    import java.awt.image.RenderedImage;
    import java.awt.image.SampleModel;
    import java.io.BufferedInputStream;
    import java.io.InputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import com.sun.media.jai.codec.ForwardSeekableStream;
    import com.sun.media.jai.codec.ImageCodec;
    import com.sun.media.jai.codec.ImageDecoder;
    import com.sun.media.jai.codec.ImageDecodeParam;
    import com.sun.media.jai.codec.ImageEncoder;
    import com.sun.media.jai.codec.ImageEncodeParam;
    import com.sun.media.jai.codec.PNMEncodeParam;
    import com.sun.media.jai.codec.SeekableStream;
    * A subclass of <code>ImageCodec</code> that handles the
    * PNM family of formats (PBM, PGM, PPM).
    * <p> The PBM format encodes a single-banded, 1-bit image. The PGM
    * format encodes a single-banded image of any bit depth between 1 and
    * 32. The PPM format encodes three-banded images of any bit depth
    * between 1 and 32. All formats have an ASCII and a raw
    * representation.
    public final class SamplePNMCodec extends ImageCodec {
    /** Constructs an instance of <code>SamplePNMCodec</code>. */
    public SamplePNMCodec() {}
    /** Returns the name of the format handled by this codec. */
    public String getFormatName() {
    return "samplepnm";
    /** Returns <code>null</code> since no encoder exists. */
    public Class getEncodeParamClass() {
    return null;
    * Returns <code>Object.class</code> since no DecodeParam
    * object is required for decoding.
    public Class getDecodeParamClass() {
    return Object.class;
    /** Returns true if the image is encodable by this codec. */
    public boolean canEncodeImage(RenderedImage im,
    ImageEncodeParam param) {
    SampleModel sampleModel = im.getSampleModel();
    int dataType = sampleModel.getTransferType();
    if ((dataType == DataBuffer.TYPE_FLOAT) ||
    (dataType == DataBuffer.TYPE_DOUBLE)) {
    return false;
    int numBands = sampleModel.getNumBands();
    if (numBands != 1 && numBands != 3) {
    return false;
    return true;
    * Instantiates a <code>PNMImageEncoder</code> to write to the
    * given <code>OutputStream</code>.
    * @param dst the <code>OutputStream</code> to write to.
    * @param param an instance of <code>PNMEncodeParam</code> used to
    * control the encoding process, or <code>null</code>. A
    * <code>ClassCastException</code> will be thrown if
    * <code>param</code> is non-null but not an instance of
    * <code>PNMEncodeParam</code>.
    protected ImageEncoder createImageEncoder(OutputStream dst,
    ImageEncodeParam param) {
    PNMEncodeParam p = null;
    if (param != null) {
    p = (PNMEncodeParam)param; // May throw a ClassCast exception
    return new SamplePNMImageEncoder(dst, p);
    * Instantiates a <code>PNMImageDecoder</code> to read from the
    * given <code>InputStream</code>.
    * <p> By overriding this method, <code>PNMCodec</code> is able to
    * ensure that a <code>ForwardSeekableStream</code> is used to
    * wrap the source <code>InputStream</code> instead of the a
    * general (and more expensive) subclass of
    * <code>SeekableStream</code>. Since the PNM decoder does not
    * require the ability to seek backwards in its input, this allows
    * for greater efficiency.
    * @param src the <code>InputStream</code> to read from.
    * @param param an instance of <code>ImageDecodeParam</code> used to
    * control the decoding process, or <code>null</code>.
    * This parameter is ignored by this class.
    protected ImageDecoder createImageDecoder(InputStream src,
    ImageDecodeParam param) {
    // Add buffering for efficiency
    if (!(src instanceof BufferedInputStream)) {
    src = new BufferedInputStream(src);
    return new SamplePNMImageDecoder(new ForwardSeekableStream(src), null);
    * Instantiates a <code>PNMImageDecoder</code> to read from the
    * given <code>SeekableStream</code>.
    * @param src the <code>SeekableStream</code> to read from.
    * @param param an instance of <code>ImageDecodeParam</code> used to
    * control the decoding process, or <code>null</code>.
    * This parameter is ignored by this class.
    protected ImageDecoder createImageDecoder(SeekableStream src,
    ImageDecodeParam param) {
    return new SamplePNMImageDecoder(src, null);
    * Returns the number of bytes from the beginning of the data required
    * to recognize it as being in PNM format.
    public int getNumHeaderBytes() {
    return 2;
    * Returns <code>true</code> if the header bytes indicate PNM format.
    * @param header an array of bytes containing the initial bytes of the
    * input data. */
    public boolean isFormatRecognized(byte[] header) {
    return ((header[0] == 'P') &&
    (header[1] >= '1') &&
    (header[1] <= '6'));

  • Mass update to FILENAME field in S_DATASET authorization object

    We are migrating to a new fileserver with a new hostname, and so I've been asked to update about 1900 instances of the S_DATASET authorization object for the new FILENAME value.  I'd like to do this programmatically if possible.
    What I've learned so far is that I need to update the value in table USR12, but the value is encoded.  When I look at the table in SE16, I do not see the encoded value field.  The value does show in UST12, but I'm told this is an unreliable table.
    So I'd like to know..
    1. How can I look at the value if not in SE16?
    2. Is there an API I can use to encode/decode the value?  If not, where is the specification on how to build it?
    If this is better addressed in a different forum, which one should I try next?
    Thanks,
    Dan

    Hi there,
    Okay I started a few tests and made a bit of progress, but am running into the problem that if I don't check the authority first using the FM and want to test what happens when the user is not authorized, then the bugger dumps (as expected and mentioned in the note)...
    But the behaviour as you have described:
    >
    > Path                   Saveflag  Fs_noread Fs_nowrite Fs_Brgru
    > =============================================================
    > *                                 X         X            DUMY
    > /temp/FI/..                       X         X            DUMY
    > /temp/FI               X                                 FIFI
    >
    ... is correct, and I found something interesting in the F1 on the spth-path field which explains this.
    > Caution:
    > - If you enter paths generically in the table SPTH, the most precise specification counts.
    > - If you select the no-read or no-write fields in the table SPTH, this overrides the authorization group.
    So, the DUMY is not needed as the check does not use it in those cases, and "/temp/FI/.." is anyway more specific than "*" so the system would have used it for DUMY anyway. But that is irrelevant... because if the begru field is empty in the FM, then the check is not performed.
    So, the only check which is effective to protect the path, is:
    Path                   Saveflag  Fs_noread Fs_nowrite Fs_Brgru
    =============================================================
    /temp/FI               X                                           FIFI
    ... and the "fs_noread" and "fs_nowrite" flags should be understood as "no protectable authority to read" and "no protectable authority to write" and not the activity field which the authority is being checked against. This is coming from the S_DATASET check (which is already known at that time to the function module).
    Using these flags, you can leave the entries in the table without having to delete them if you want to turn them off and on temporarily. Perhaps an "active / inactive" switch would have been clearer...
    form CHECK_PERMISSION using ISPTH_HEAD type SPTH
                                MODE       type CLIKE
                                SUBRC      type SY-SUBRC.
    data: ACTIVITY like AUTHB-ACTVT.
       SUBRC = 0.
       case MODE.
         when 'R'.
              ACTIVITY = '03'.
         when 'W'.
              ACTIVITY = '02'.
         when 'D'.
              ACTIVITY = '02'.
       endcase.
       if ISPTH_HEAD-FS_BRGRU <> SPACE.  "Here it is... for BEGRU checks there must be a value...
          authority-check object 'S_PATH'
              id  'FS_BRGRU' field ISPTH_HEAD-FS_BRGRU
              id  'ACTVT'    field ACTIVITY.
           if SY-SUBRC <> 0.
              SUBRC = 3.
           endif.
       endif.
    endform.
    Cheers,
    Julius

  • "Adobe Reader could not open 'filename.pdf' because it either...

    The full error message reads: "Abobe Reader could not open 'filename.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded)."
    I understand this is a common problem, but I have yet to see a clearly defined answer. I am running the latest update of Abobe Reader 9.3 on Windows 7. It didn't work on other updates either.
    I received the file as an e-mail attachment, along with some other PDFs. All of them can be opened except this one. I tried forwarding the e-mail to other servers (i.e. Hotmail) and I couldn't open it there either.
    I have tried opening it directly from the Adobe Reader program, latest version of IE, and latest version of Firefox. I have tried unchecking the "Display PDF in Browser" box under Edit > Preferences. I have tried changing the file name and adding ".pdf" to the end of it. Nothing works.
    The file says "27 KB" which sounds a little low to me since this should be a fair-sized document, but doesn't read "0 KB" as others with this problem have noted.
    Any help with this issue so this question can finally be resolved for the hundreds of people that have had this error message would be greatly appreciated.
    Thanks.

    brittnic2008 wrote:
     Any help with this issue so this question can finally be resolved for the hundreds of people that have had this error message would be greatly appreciated. 
    Thanks.
    There has been tons of help on this issue.
    The official word is, ZIP the PDF's before emailing or post them to a website and email a link to them. Some email clients use encoding (Adobe can't do anything about that part) and when the file is decoded at the other end, it is corrupted. It can happen to some of them or all of them.

  • Can't get the attachment filename out of a Part (with non ascii characters)

    Hello, all and happy new year :)
    My issue is with non ascii filename in attachments... Yes i've read the FAQ : http://www.oracle.com/technetwork/java/faq-135477.html#encodefilename
    I can't get the filename out of the BodyPart for those kind of attachments
    here's my unit test :
         * contains various parts from various mailer encoded in different ways...
         private enum EncodedFileNamePart{
              OUTLOOK("Content-Type: text/plain;\n name=\"=?iso-8859-1?Q?c'estd=E9j=E0no=EBl=E7ac'estcool.txt?=\" \nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment;\n filename=\"=?iso-8859-1?Q?c'estd=E9j=E0no=EBl=E7ac'estcool.txt?=\" \n\nnoel 2010\n","c'estdéjànoëlçac'estcool.txt"),
              GMAIL("Content-Type: text/plain; charset=US-ASCII; name=\"=?ISO-8859-1?B?ZOlq4G5v62znYWNlc3Rjb29sLnR4dA==?=\"\nContent-Disposition: attachment; filename=\"=?ISO-8859-1?B?ZOlq4G5v62znYWNlc3Rjb29sLnR4dA==?=\"\nContent-Transfer-Encoding: base64\nX-Attachment-Id: f_giityr5r0\n\namluZ2xlIGJlbGxzIQo=\n","déjànoëlçacestcool.txt"),
              THUNDERBIRD("Content-Type: text/plain;\n name=\"=?ISO-8859-1?Q?d=E9j=E0no=EBl=E7acestcool=2Etxt?=\"\nContent-Transfer-Encoding: 7bit\nContent-Disposition: attachment;\n filename*0*=ISO-8859-1''%64%E9%6A%E0%6E%6F%EB%6C%E7%61%63%65%73%74%63%6F;\n filename*1*=%6F%6C%2E%74%78%74\n\njingle bells!\n","déjànoëlçacestcool.txt"),
              EVOLUTION("Content-Disposition: attachment; filename*=ISO-8859-1''d%E9j%E0no%EBl.txt\nContent-Type: text/plain; name*=ISO-8859-1''d%E9j%E0no%EBl.txt; charset=\"UTF-8\" \nContent-Transfer-Encoding: 7bit\n\njingle bells\n","déjànoël.txt"),
              String content=null;
              String target=null;
              private EncodedFileNamePart(String content,String target){
                   this.content=content;
                   this.target=target;
              public Part get(){
                   try{
                   ByteArrayInputStream bis = new ByteArrayInputStream(this.content.getBytes());
                   Part part = new MimeBodyPart(bis);
                   bis.close();
                   return part;
                   catch(Throwable e){
                        return null;
              public String getTarget(){
                   return this.target;
         @Test
         public void testJavamailDecode() throws MessagingException, UnsupportedEncodingException{
              System.setProperty("mail.mime.encodefilename", "true");
              System.setProperty("mail.mime.decodefilename", "true");
              for(EncodedFileNamePart part : EncodedFileNamePart.values())
                   assertEquals(part.name(),MimeUtility.decodeText(part.get().getFileName()),part.getTarget());     
    I take a NullPointerExcepion in the decodeText because getFileName() return null for the EVOLUTION case, and work well with OUTLOOK, THUNDERBIRD and GMAIL.
    Evolution's content type is "Content-Disposition: attachment; filename*=ISO-8859-1''d%E9j%E0no%EBl.txt" wich doesn't look like the other (looks like the RFC 2616 or RFC5987 to do it.)
    How can i handle this situation except by writting my own decoder?
    Thanks for your answers!
    Edited by: user13619058 on 4 janv. 2011 07:44

    Set the System property "mail.mime.decodeparameters" to "true" to enable the RFC 2231 support.
    See the javadocs for the javax.mail.internet package for the list of properties.
    Yes, the FAQ entry should contain those details as well.

  • Setting default filename for servlet-based download

    I'm new to servlet programming and am attempting to download a file from the server to the client. When I am prompted to open the file from it's current location or save it to disk, the correct filename appears. However, when I click ok and the Save dialog appears, the default filename isn't the actual name of the file but instead contains the name of the package the servlet is located in. Can anyone tell me how I can change my code to have the default filename appear instead of the package name. Thanks.
    Here is the code to call the servlet located in the package named 'frosttwo':
    WebgapBeanFactory wgbf = WebgapBeanFactory.getWebgapBeanFactory();
    String path = wgbf.getTransferFileDirectory();
    String filename = path + request.getParameter("file");
    System.out.println(filename);
    response.sendRedirect("/servlet/frosttwo.Servlet1?file=" + filename);
    Here is the code contained in the servlet:
    public class Servlet1 extends HttpServlet {
    private static final String CONTENT_TYPE = "text/html";
    /**Initialize global variables*/
    public void init(ServletConfig config) throws ServletException {
    super.init(config);
    /**Process the HTTP Get request*/
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    String file = null;
    try
    file = URLDecoder.decode(request.getParameter("file"));
    String filename = file.substring((file.lastIndexOf(File.separatorChar) + 1), file.length());
    response.setContentType("application/octet-stream");
    response.setHeader("Content-disposition", "attachment;filename=" + filename);
    File f = new File(file);
    FileInputStream is = new FileInputStream(f);
    ServletOutputStream s = response.getOutputStream();
    byte[] buffer=new byte[8192];
    int length=buffer.length;
    while((length=is.read(buffer))!=-1)
    s.write(buffer,0,length);
    s.flush();
    catch (IOException ex)
    System.err.println("There was an error sending file " + file);
    ex.printStackTrace();
    catch (Exception ex)
    System.err.println("There was an error sending file " + file);
    ex.printStackTrace();
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    doGet(request, response);
    /**Clean up resources*/
    public void destroy() {
    Thanks again.

    I use something like this for res.setHeader and it works fine for me. In the save dialog box it puts this filename there. But if its not able to find the filename then sometime it used to put servletname instead of filename:
    res.setHeader("Content-Disposition","multi-part attachment;filename=\""+
    fname+"\";");
    hope it helps
    vinod

  • Language:  Filename with characters for arabic turns question mark

    Language: Filename with characters for arabic turns question mark
    OS: Solaris 9
    Machine: Sun-Fire 25K
    There is an adobe distiller software that is configured and a java apps. There are postscript files that are being converted to .pdf format using the adobe distiller. Using the GUI (using the Exceed; for remote access), when they use GUI to convert the postscripts to pdf files, the long filenames have the corresponding characters for arabic reading purpose. This is OK.
    When we use the windows RUN to telnet the server and convert the postscripts to pdf, it gives a question marks characters in the filenames ( this; is a sample; filename; ?? ??? ??; right.pdf )
    We are not sure now if we have to add a package of arabic or a patch to resolve this problem.
    Message was edited by:
    yurioira32
    Message was edited by:
    yurioira32

    Solution found, I'll post the work around to those who might encounter the same problem.
    Somewhere in the layers of technology (webwork or weblogic I'd guess), the servlet response is encoded into UTF-8 regardless. The encoding in the database was ISO-8859-1. Sending ISO encoded bytes by UTF-8 caused the conflicting character codes (anything above 127) to show up as undefined.
    The fix is to decode the input byte array into ISO-8859 string, then encode that string into UTF-8, which can be send by Weblogic.
    isoConvert = new String(buf, "ISO-8859-1");
    out.write(isoConvert.getBytes("UTF-8"), 0, isoConvert.getBytes("UTF-8").length);

  • MIME header missing "filename=" results in BAD messages

    I've been trying to track down several issues involving what appear to
    be MIME handling issues. We are running GroupWise v7.01 (we have not
    installed the "interim release" yet), and all components on the server
    are at that release level (MTA, POA, GWIA, WebAccess).
    One of the issues I am currently working on involves problems receiving
    attachments from an outside sender. Their attachments are readable if
    sent to an outside test account (i.e. - we've tested it with Yahoo
    web-based mail, and a RoadRunner POP3 account using Outlook as the client).
    The problem is that these e-mails either get dumped by the GWIA to the
    GWPROB directory, or the e-mails go through, but the attachments are
    corrupted (they do show up as attachments to the e-mail, but are
    unreadable).
    I haven't looked at why some e-mails go through and some don't, but I
    did find out why the attachments are unreadable on the delivered
    e-mails, and why the rest are just undeliverable. For whatever reason,
    the sender's mail server (or AV gateway or whatever else had a chance to
    touch the e-mail) is either not inserting, or is stripping out the
    "filename=" from the MIME header just before the encoded attachment.
    Adding this back into the message (by editing the original e-mail
    w/header, and dropping the modified message into the GWIA "RECEIVE"
    directory) fixes the attachment AND makes the e-mail deliverable.
    Below I have an example of a bad e-mail which was originally sent to our
    GWPROB directory, but was successfully delivered with a readable
    attachment through a separate POP3 account (RoadRunner). Following this
    "bad" e-mail example is the "fixed" version of that same e-mail, which
    was delivered successfully to our user, with the attachment also being
    readable.
    *************** This is the original "BAD" e-mail ***************
    MAIL From:<[email protected]> SIZE=73686
    RCPT To:<[email protected]>
    Received: from test.rr.com ([65.xx.xx.xx])
    by smtp.ourhost.com with ESMTP; Wed, 21 Feb 2007 15:28:27 -0500
    Received: from local.com (rrcs-24-xx-xx-xx.central.biz.rr.com [24.xx.xx.xx])
    by test.rr.com (8.13.6/8.13.6) with ESMTP id l1LKSFTm009106
    for <[email protected]>; Wed, 21 Feb 2007 15:28:24 -0500 (EST)
    Message-Id: <[email protected]>
    From: [email protected]
    To: [email protected]
    Date: Wed, 21 Feb 2007 15:25:54 -0500
    MIME-Version: 1.0
    X-Mailer: Telexis Gateway
    Content-Type: multipart/mixed;
    boundary="Mark=Num1_Lev1_2007221202554265_Tlx"
    X-Virus-Scanned: Symantec AntiVirus Scan Engine
    --Mark=Num1_Lev1_2007221202554265_Tlx
    Content-Type: text/plain
    Content-Transfer-Encoding: Quoted-Printable
    This is a test
    -Test Sender
    --Mark=Num1_Lev1_2007221202554265_Tlx
    Content-Type: application/vnd.ms-excel;
    name="1st Q 2007 Income to Budget.xls"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
    "1st Q 2007 Income to Budget.xls"
    0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAZgAAAAAAAAAA
    EAAA/v///wAAAAD+////AAAAAGUAAAD/////////////////////////////////////////////
    --Mark=Num1_Lev1_2007221202554265_Tlx--
    ************** END OF BAD E-MAIL **************
    *************** This is the "fixed" e-mail ***************
    MAIL From:<[email protected]> SIZE=73686
    RCPT To:<[email protected]>
    Received: from test.rr.com ([65.xx.xx.xx])
    by smtp.ourhost.com with ESMTP; Wed, 21 Feb 2007 15:28:27 -0500
    Received: from local.com (rrcs-24-xx-xx-xx.central.biz.rr.com [24.xx.xx.xx])
    by test.rr.com (8.13.6/8.13.6) with ESMTP id l1LKSFTm009106
    for <[email protected]>; Wed, 21 Feb 2007 15:28:24 -0500 (EST)
    Message-Id: <[email protected]>
    From: [email protected]
    To: [email protected]
    Date: Wed, 21 Feb 2007 15:25:54 -0500
    MIME-Version: 1.0
    X-Mailer: Telexis Gateway
    Content-Type: multipart/mixed;
    boundary="Mark=Num1_Lev1_2007221202554265_Tlx"
    X-Virus-Scanned: Symantec AntiVirus Scan Engine
    --Mark=Num1_Lev1_2007221202554265_Tlx
    Content-Type: text/plain
    Content-Transfer-Encoding: Quoted-Printable
    This is a test
    -Test Sender
    --Mark=Num1_Lev1_2007221202554265_Tlx
    Content-Type: application/vnd.ms-excel;
    name="1st Q 2007 Income to Budget.xls"
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment;
    filename="1st Q 2007 Income to Budget.xls"
    0M8R4KGxGuEAAAAAAAAAAAAAAAAAAAAAPgADAP7/CQAGAAAAAAAAAAAAAAABAAAAZgAAAAAAAAAA
    EAAA/v///wAAAAD+////AAAAAGUAAAD/////////////////////////////////////////////
    --Mark=Num1_Lev1_2007221202554265_Tlx--
    ************** END OF "FIXED" E-MAIL **************
    The only change I made, which both allowed the above e-mail to be
    delivered and made the attachment readable, was the addition of the
    "filename=" just before the file name on the line after the
    "Content-Disposition: attachment;".
    I did the same test with an e-mail that had the same "filename="
    missing, but somehow was successfully delivered to our user (again, the
    attachment was unreadable). Adding the "filename=" into the resent
    message did make the attachment readable.
    I haven't looked to see if the sender's system is actually non-compliant
    for excluding the "filename=" (I will be doing that later this evening),
    or whether this is a GWIA problem for not being able to handle this. I
    just wanted to throw this out there to see if anyone else has seen this.
    Does the "interim release" update by chance fix this?
    Thanks,
    Greg Niese

    Does this email come in directly to GWIA (or do you have a relay host in
    between)? I must say I've never experienced this problem on any of the GW
    systems I administer. Could you tell us what domain this is coming from?
    Ted Kumsher
    >>> On 2/23/2007 at 8:21 AM, in message
    <[email protected]>, Greg
    Niese<[email protected]> wrote:
    > I agree that this shouldn't be accepted as a valid "filename parameter"
    > line. There are two ways to "not accept" this invalid parameter: "stop
    > processing" the e-mail because of the problem (discard the e-mail), or
    > discard the bad parameter and continue processing the rest of the e-mail
    > (this could only work when the parameter is optional, as in this case).
    > The GWIA seems to take the route of "stop processing", and then moving
    >
    > the resultant "bad" e-mail to the GWPROB directory.
    >
    > I say "seems" because in many cases where this occurs the e-mail doesn't
    > get sent to the GWPROB directory, but instead still gets through the
    > GWIA to the user. The attachments are corrupted, but still show up
    > correctly in the attachment window, so everything seems OK with the
    > e-mail & attachment - until you try to open the attachment.
    >
    > If there is a semi-colon after the "Content-disposition" type, the GWIA
    > should see a valid disposition parameter following. But if it sees an
    > invalid parameter, as in this case, what is the GWIA doing? It must
    > either be discarding the invalid parameter, or "uses" it by either
    > incorrectly parsing it as part of the header, or lumping it in as part
    > of the attachment. If it "uses" in any way the invalid line of data -
    > that sounds like the definition of "accepting" it, isn't it?
    >
    > To test whether the GWIA is actually using, and therefore "accepting",
    > this bad parameter, I simply removed the malformed parameter (having the
    >
    > line in or out shouldn't matter if the GWIA's not using it), and I tried
    >
    > this both with the semi-colon removed from the end of the
    > "content-disposition" type, and with that semi-colon left in place. In
    > both cases the GWIA properly processed the e-mail and the attachment was
    > readable! What does that mean? If the GWIA was truely NOT
    > using/accepting that invalid header parameter (i.e. - the GWIA discards
    > it), then the e-mail and attachment should go through OK. Since this
    > isn't what happens when the bad line is left in place (the attachments
    > DO NOT come through OK, but the e-mail often does get to the user's
    > mailbox), then the GWIA must be accepting that bad parameter as either a
    >
    > part of the header, or a part of the attachment.
    >
    > I suspect that in those cases that these e-mails are sent to the problem
    > directory, instead of being delivered with a corrupt attachment, the
    > GWIA isn't really recognizing that the optional disposition parameter is
    >
    > "bad". The reason for the e-mail going to the problem directory is
    > probably due to an error while trying to decode the attachment if the
    > bad parameter is treated as part of the attachment, or if part of the
    > attachment is being lumped in with the malformed parameter as it is
    > parsed.
    >
    > I agree that how the GWIA should go about "not accepting" bad header
    > parameters may be debatable (assuming that the GWIA were actually
    > halting processing of the e-mail when this type of problem is found, and
    > then sending the e-mail to the problem directory every time). But in
    > cases such as this, since the parameter itself is optional, it would
    > seem that the better route would be for the GWIA to discard the
    > parameter and continue processing, instead of "discarding" the whole
    > e-mail (to the problem directory). "Discarding the bad parameter" seems
    > to be what is being done by at least a few other competing SMTP agents,
    > since the other mail systems I tested with did get the e-mail through
    > without corrupting the attachment.
    >
    > I may suggest that the sender's company fix whatever is going on at
    > their server, but it probably won't do any good (I've already been told
    > that they don't experience this problem with anyone else). In the
    > meantime, my user (yes...he is the CEO), will have to continue to have
    > some important e-mails sent to one of his personal accounts, because
    > those e-mail systems receive these e-mails fine, but our GroupWise
    > system can't.
    >
    > :-(
    >
    > -Greg
    >
    >
    >
    > Michael Bell wrote:
    >> No it shouldn't, IMO.
    >>
    >> It's a matter of interpretation, of course. But GWIA is 100% right in
    > not
    >> accepting this as vaid (that part is beyond any debate - it's in the
    > RFC).
    >>
    >> The only part that can be debated is "should GWIA then pass the buck"?.
    > In
    >> olden days, many would have said yes.
    >>
    >> But In general, no. Moving away from Postel's law, which was formulated
    > in a
    >> pre-malware age, is pretty much needed. Tight specifications and
    > pickiness
    >> is good. Collateral damage is unfortunate, and of course one needs to be
    >
    >> flexible if this is a widespread issue (which frankly, it is not in this
    >
    >> case), but otherwise it is up to to sender to fix their issue.
    >>
    >> 90% of viruses and malware in the last 6 years (and I'm well aware of
    > them,
    >> working in the email security field) are from MALFORMED e-mail, that the
    >> gateway and client misinterpreted. Many of these were MS issues, but
    > that's
    >> another point. Point is you have to be STRICT.
    >>
    >> In this case this violates the generic MIME RFCs which state that if you
    > do
    >> have parameters, they all gotta be separated with semicolons (PASS), and
    >
    >> have to be name=value pairs (FAIL).
    >>
    >>
    >> "Greg Niese" <[email protected]> wrote in message
    >> news:[email protected]...
    >>> Well, according to RFC 2183, the "filename=" string has to be present if
    >
    >>> the Filename parameter is going to be used. So the sending host seems
    > to
    >>> be "broken" in that regard.
    >>>
    >>> My next question then is: Should the GWIA ignore the "stray" file name
    > in
    >>> these e-mail headers, instead of allowing it to be lumped in with the
    >>> attachment (I'm assuming that's why the attachment is trashed)? It
    >>> appears that other systems are able to do this.
    >>>
    >>> -Greg
    >>>
    >>> Greg Niese wrote:
    >>>> I haven't looked to see if the sender's system is actually
    non-compliant
    >>>> for excluding the "filename=" (I will be doing that later this
    evening),
    >
    >>>> or whether this is a GWIA problem for not being able to handle this. I
    >>>> just wanted to throw this out there to see if anyone else has seen
    this.
    >>>>
    >>>> Does the "interim release" update by chance fix this?
    >>>>
    >>>> Thanks,
    >>>>
    >>>> Greg Niese
    >>>>
    >>
    >>

  • Decoding attachment names in mail

    Hi there,
    it seems I do not get rid of the decoding problems. After getting the first problem solved [how to decode attachment filename with character set and continuation?|http://forums.sun.com/thread.jspa?threadID=http://forums.sun.com/thread.jspa?threadID=5311583] I just a follow-up which I do not really understand.
    I have a filename in a mail like
    "BRH-Bericht nach=?ISO-8859-15?Q?=A788=282=29BHO_IT-Wirtschaftlichkeits?==?ISO-8859-15?Q?betrach"tungen_VII2-2004-13178_v=2E_19=2E06=2E08=2E?==?ISO-8859-15?Q?pdf?="
    (without quotes)
    With System.setProperty("mail.mime.decodefilename", true) set, I get as decoded filename:
    BRH-Bericht nach �88 (2)BHO IT-Wirtschaftlichkeits=?ISO-8859-15?Q?betrachtungen_VII2-2004-13178_v=2E_19=2E06=2E08=2E?==?ISO-8859-15?Q?pdf?=
    what I should get:
    BRH-Bericht nach �88 (2)BHO IT-Wirtschaftlichkeitsbetrachtungen VII2-2004-13178 v. 19.06.08
    The method MimeUtility.decodeText() does also not seem to change anything in the result. Can anybody help or tell me a place to find some answers to this encoding stuff, it seems to me that I do not really understand what's behind it.
    Regards Karsten

    Recently, dealing with a Java Mail based application, I stumbled across file names encoded like this:
    --__Next_1218544601_Part105__
    Content-Disposition: Attachment; filename="=?ISO-8859-1?b?UGzkbmUxMUE1REY5MDAwMjUwNzktNTA4NS0xX3BkZi56aXA=?="
    Content-Type: application/octet-stream;
    Name="=?ISO-8859-1?b?UGzkbmUxMUE1REY5MDAwMjUwNzktNTA4NS0xX3BkZi56aXA=?="
    Content-Transfer-Encoding: Base64Am I suffering from a similar problem? Browsing the forums and the JavaMail API reference (mainly related to the MimeUtility class), I initialized my Session using these settings...
    props.put("mail.mime.decodeparameters","true");
    props.put("mail.mime.decodetext.strict","false");... which didn't change anything however. Using MimeUtility.decodeText() on that does create file names not even slightly resembling what the original filename is supposed to be (something like "Pl�ne115....zip", trouble caused by the "�" obviously as it seems to work otherwise with mails sent by the same sender). Or am I still missing something, is such an encoding of file name common practise? Haven't at the very least seen it this way, so far...
    Cheers & thanks,
    Kristian

  • Adobe Reader could not open 'filename.pdf'" because it is either not a supported file type...

    I have a website that holds 23 different PDF's. They all download fine and open correctly when downloading from a Mac computer. They even download and open fine from a Mobile Phone. However my client is getting an error over and over again. I have tested it out and this is what I have come up with.
    Error:
    Adobe Reader could not open 'filename.pdf'" because it is either not a supported file type or because the file has been corrupted (for example, it was sent as an email attachment and wasn't correctly decoded)
    I have resaved the PDF's to be compatible with Reader 6.
    Works fine with
    All Mac's using either Firefox, Chrome or Safari using Pro and Reader
    iPhone downloads using iBook
    PC's when downloading from Firefox viewing in Reader 9
    PC's when downloading from IE 6.0 view on Reader 8
    Error Message When
    PC when downloading from IE 7 viewing on Reeder 9
    PC when downloading from IE 8 viewing on Reader 9
    Here goes the URL when the files resides.
    Please help. I can not find a solution.

    Hi i have solved the ie bug creating the pdf phisically, this is the code i use:
    $hostname = "XXXXXX";
    $database = "XXXXX";
    $username = "XXXXX";
    $password = "XXXXXX";
    $db = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
    mysql_select_db($database, $db);
    $query_rs_docs = "SELECT * FROM doc WHERE doc_name='".$_GET['doc_name']."'";
    $rs_docs = mysql_query($query_rs_docs, $db) or die(mysql_error());
    $row_rs_docs = mysql_fetch_assoc($rs_docs);
    $totalRows_rs_docs = mysql_num_rows($rs_docs);
    $t_pdf = fopen("/path to doc folder/doc/".$row_rs_docs['doc_name'], "w+");
    fwrite($t_pdf, $row_rs_docs['doc_file']);
    fclose($t_pdf);
    header('Location: http://www.portalesardegna.com/doc/'.$row_rs_docs['doc_name']);
    the db table (doc_name must contain the .pdf extension):
    CREATE TABLE IF NOT EXISTS `doc` (
      `doc_ID` int(10) NOT NULL auto_increment,
      `doc_name` varchar(255) NOT NULL,
      `doc_file` longblob NOT NULL
      PRIMARY KEY  (`doc_ID`)
    ) ENGINE=MyISAM;
    Message was edited by: Portale Sardegna

Maybe you are looking for

  • SDO_UTIL.AFFINETRANSFORMS

    I have the following parameters for 2D affine transformation: Two translation: tx=2754.3661 and ty = -237.0731 and rotation in radians: -.001016214498072193185827329 Is this specification correct: SDO_UTIL.TO_WKTGEOMETRY(SDO_UTIL.AffineTransforms ( g

  • Overclocking I7 920 what type of memory ?

    Hi Harm suggested that i get this great OCZ kit of memory with the purpose of overclocking in mind, unfortunately it is not avaible to me, but the listed Corsair kit is.. Would it still be possible to do a moderate OC with this memory, or MUST it be

  • XSQL and IIS

    I did a search on this forum and the new group. Can't find any information. Whate can I download the XSQL servlet and how to configure it with IIS? Thanks Bob

  • New itunes quits on me (10.5.8, G4) any help?

    new itunes quits on me (10.5.8, G4) any help?

  • Problems in extracting changed documents

    Hi Experts, I am new to sdn and this is my second post, My requirement is to extract changed documents from CRM to BW as they are neither stored in any database tables nor i think i can fetch them through function module but I can view them in for ex