Need help in setting file name with special characters in attachment

Hi
We have a requirement where we need to set the file name that contains special characters (like Russian) and send mauil using Java mail.
If we set the file name as such, the attachment in the email contains garbled filename
Can you pl let me know how to resolve this?
We should use the file name as attachment name and this will have say special characters. The receiver who gets the mail should get with the correct attachment name
One important point.. the attachments are opened from MS outlook.
Thanks and regards
Ram
Edited by: 884910 on 13 Sep, 2011 5:00 AM

Read the FAQ carefully. You don't need to call encodeText unless you're using a really
old version of JavaMail.
And, it depends on whether the mail reader you're using is handling encoded parameters
according to the (new) MIME standard, or according to the (old) non-standard hack.
Sadly, without knowing what mail reader the recipient is using, it's impossible to use
encoded filenames that will work everywhere.

Similar Messages

  • Need help in using replace function with special characters

    I have a column in a table where the data can contain ascii code for special characters such as an apostrophe.
    The data looks like this:
    CREEK'S LANE
    ie for a street named CREEK'S LANE.
    I want to replace the ascii representation with the apostrophe and have the returned data show up as: CREEK's LANE
    When I try the query below I get prompted for substitution variable value.
    I don't seem to be able to find the right syntax to make this query work.
    SELECT REPLACE (street_name, ''', '''')
    FROM
    streets WHERE street_id = 1
    Does anybody know how to do this?
    Any help would be much appreciated.
    Thanks.
    George

    george91 wrote:
    I have a column in a table where the data can contain ascii code for special characters such as an apostrophe.
    The data looks like this:
    CREEK'S LANE
    ie for a street named CREEK'S LANE.
    I want to replace the ascii representation with the apostrophe and have the returned data show up as: CREEK's LANE
    When I try the query below I get prompted for substitution variable value.
    I don't seem to be able to find the right syntax to make this query work.
    SELECT REPLACE (street_name, ''', '''')
    FROM
    streets WHERE street_id = 1
    Does anybody know how to do this?
    Any help would be much appreciated.
    Thanks.
    GeorgeHa! The codes you specified rendered in the HTML, but showed properly when I listed your original posting above. I didn't understand what you meant initially because the 5-character string represenation got rendered as the quote that you said you weren't able to get - a display problem.
    You're getting prompted for the substituon variable because of the ampersand; you appear to be doing this in SQL*PLUS. The first thing I would try is to SET DEFINE OFF when using the ampersands to see if that works. If That doesn't work check the docs to delmit the ampersand (I think its a backslash before it but can't remember offhand). Another, harder option might be to use the TRANSLATE function replacing the literal character instead of using REPLACE (though replacing a quote will be a little tricky). If you're on 10g also consider using the advanced quoting
    Good luck!
    Edited by: riedelme on May 22, 2009 12:45 PM

  • Issue in creating a add link to a document content type on a doc lib name with , / special characters

    hi,
    i am having a  requirement to create/use "add link to a document" content type for a item in the document library.
    so i got  the code from below site :
    http://howtosharepoint.blogspot.in/2010/05/programmatically-add-link-to-document.html
    my issue is, if teh document  library names are single words - like MOM, model, procedures etc this  functionality is working fine and i am able to view the link to a document as an item. 
    but when the doc lib name contains special characters like , or  /  , this link to a  document  content type functionality is NOT working.
    can anyone pls point me whether this is the  actual  issue ? ie, if  the doc lib name contains special chars  like , or /  my
    add link to a document wont work? is there any restrictions/limitations for doc lib names in SharePoint ?
    for eg: my doc lib names are :
    1) Report and analysis, Data
    2) form / template
    3) map/ plot
    help is highly appreciated!

    hi,
     its talking abt the subsite names and  folders and NOT the document librraies.
     is there any link which gives the naming convention / restricted names for  document libs or  splists , from msdn / blogs.technet.
    thnx

  • Set file name with XSLT - receiver channel - elements from XML?

    Dear experts,
    I have an XSLT mapping for a message that is sent via a receiver channel to a customer.
    The customer wants a certain file name which is put toghether by elements from the XML message.
    I have looked at:
    Re: Java Map for writing the file
    The java code and the XSLT work perfectly!
    In the line
    fos = new FileOutputStream(new File("Fixed_" + new Date().getTime() + ".xml"));
    a fixed value, date and time are used for the file name.
    But I need some values from the XML message to create my name. But how do I do that? Can I somehow get values from the XML message through that java function or do I have to adapt the XSLT?
    Can someone please help me!
    Thank you,
    Peter

    Hi Udo, Hello experts,
    Now I do have a problem. I am using this XSL file:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:map="java:java.util.Map"
      xmlns:dyn="java:com.sap.aii.mapping.api.DynamicConfiguration"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:output indent="no" />
    <xsl:param name="inputparam"/>
    <xsl:template match="/">
        <!-- change dynamic configuration -->
        <xsl:variable name="dynamic-conf" 
            select="map:get($inputparam, 'DynamicConfiguration')" />
        <xsl:variable name="dynamic-key"  
            select="key:create('http://sap.com/xi/XI/System/File', 'FileName')" />
        <xsl:variable name="dummy"
            select="dyn:put($dynamic-conf, $dynamic-key, 'TOOLDATA_.xml')" />
      <xsl:copy-of select="." />
    </xsl:template>
    </xsl:stylesheet>
    But then the output file is only named "TOOLDATA_.xml". So I assume the XSL is working.
    And I am using this Java-file:
    package pi_mappings;
    import com.sap.aii.mapping.api.*;
    import java.io.*;
    import java.util.*;
    public class SetFileName extends AbstractTransformation
         static final int BUFFER = 1024*1000;
        private Map param;
        public SetFileName(){  }
         public void setParameter (Map map)
              param = map;
              if (param == null)
                   param = new HashMap();
         public static void main(String args[])
              try
                   InputStream in = new FileInputStream(args[0]);
                   OutputStream out = new FileOutputStream(args[1]);
                   SetFileName sfn = new SetFileName();
                   //sfn.setParameter(mapOfMap);
                   sfn.execute(in, out);
              catch (Exception e)
                        e.printStackTrace();
        public void execute(InputStream inputstream, OutputStream outputstream)
        throws StreamTransformationException {
              try
                   DynamicConfiguration conf = (DynamicConfiguration) param.get("DynamicConfiguration");
                   DynamicConfigurationKey KEY_FILENAME = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
                   int len = 0;
                   byte buf[] = new byte[BUFFER];
                   FileOutputStream fos = null;
                   if (conf != null)
                        fos = new FileOutputStream(new File(conf.get(KEY_FILENAME) + new Date().getTime()) ); //sample only
                   else
                        fos = new FileOutputStream(new File("Fixed_" + new Date().getTime() + ".xml"));
                        while ((len = inputstream.read(buf)) > 0)
                             outputstream.write(buf, 0, len);
                             fos.write(buf, 0, len);
                        fos.close();          
              catch(Exception e){ e.printStackTrace();}
         public void transform(TransformationInput arg0, TransformationOutput arg1)
         throws StreamTransformationException {
              getTrace().addInfo("JAVA Mapping Called");
         this.execute(arg0.getInputPayload().getInputStream(), arg1
              .getOutputPayload().getOutputStream());
    Could you please help me find the mistake. I tried to test it locally by changing the main-method but I could not get it to work.
    Thank you very much for any ideas!
    Best regards,
    Peter

  • Mac file name restrictions/special characters

    What are the Mac OS file name restrictions? What are the special characters to avoid?
    Is this a legitimate file name? Are the colons allowed?
    /Users/Joe/Desktop/MyDocument 3:2:06.xls
      Windows XP Pro  

    Thanks, Sagesse. I'm new to the Mac OS. Is it tied to Unix in such a way that the colons are allowed?
    A user tried to provide a file with a name similar to that in my original post (e.g. "name 3:4:07.rtf") using a web form, and I'm at a loss as to how they could have saved it with the colons. Thank you for your assistance.

  • Does photoshop cs5 sdk support file names with unicode characters?

    Hi,
    For the export module, does the windows sdk have support for filenames with unicode characters?
    The ExportRecord struct in PIExport.h has an attribute filename declared as char array.
    So I have a doubt whether filenames with unicode characters will be supported for export module.
    Thanks in advance,
    Senthil.

    SPPlatformFileSpecificationW is not available in ReadImageDocumentDesc.
    It has SPPlatformFileSpecification_t which is coming as null for export module.
    I am using phostoshop cs5 sdk for windows.
    Thanks,
    Senthil.

  • JAXB compiler for class names with special characters

    Hi,
    I trying to run the xjc against an XSD where element names (class names) have an "_" in them. For eg ACCOUNT_AKG.
    JAXB creates a class ACCOUNTAKG and omits the "_". I need "_" to be preserved in the class name of the class is generated.
    Can someone show me the right direction , so I can create classes with "_" preserved in the class name.
    This would be a big help
    thanks
    Jax

    Hi,
    I trying to run the xjc against an XSD where element names (class names) have an "_" in them. For eg ACCOUNT_AKG.
    JAXB creates a class ACCOUNTAKG and omits the "_". I need "_" to be preserved in the class name of the class is generated.
    Can someone show me the right direction , so I can create classes with "_" preserved in the class name.
    This would be a big help
    thanks
    Jax

  • File name with spaces

    Hi,
      I am unable to upload files with file name having blank spaces to cFolders 4.0.
    Kindly help me to resolve this issue.
    Regards,
    Shynu John

    Hi Shynu,
    Please refer the following note.
    Note 959280 - File names with special characters are uploaded incorrectly.
    Regards,
    Pavan

  • How do I find file names containing special character

    hi all
    I need your help with a code that deals with finding file names containing special characters like * / \ : ? " |
    the reason is I am doing a project that transfer files and folders from Mac to Windows. But names containing above characters cant be moved to windows.
    the part of the code I write is like this
    set illegal_syntax to paragraphs of (do shell script "find " & quoted form of POSIX path of oneFolder & " -name '*'")
    if (illegal_syntax is not equal to {""}) then
    repeat with each_record in illegal_syntax
    do shell script "/usr/bin/ditto -c -k -rsrc --keepParent " & quoted form of each_record & space & quoted form of (each_record & ".zip")
    end repeat
    end if
    First of all that '' will gives me an error.
    Second, what i tried to do is once the file/folder is found, zip it at current location. But the problem is how can I zip it without the special character? or should I just give it a name, like "originalfile.zip";?
    Last, or maybe you have better idea to deal with this situation? BTW, I can not rename or delete the file/folder because customer won't allow me to do it.

    The backslash is used to escape characters in AppleScript, so if you want to use it in a string you need to escape the escape character, for example "\\*".
    You could set the name of the archive by replacing the illegal character with another one, such as an underscore:
    <pre title="this text can be pasted into the Script Editor" style="font-family: Monaco, 'Courier New', Courier, monospace; font-size: 10px; padding: 5px; border: 1px solid #000000; width: 720px; color: #000000; background-color: #FFDDFF; overflow: auto">set each_record to "some*file*name" -- example
    set {TempTID, AppleScript's text item delimiters} to {AppleScript's text item delimiters, "*"}
    set the ItemList to text items of each_record
    set AppleScript's text item delimiters to "_"
    set each_record to the ItemList as text
    set AppleScript's text item delimiters to TempTID
    log each_record --> some_file_name
    </pre>

  • Camparing file name with a value of the field in the source

    Hi All,
    I have a file sender. I need to compare the file name with the value of a field in the source and then map to the target.
    For example:
    <Record>
         <Date>20071103></Date>
         <name>abcd</name>
    </Record>
    the name of the file would be 20071103. i need to check this file name with value in 'date' field , if its true then we need to map it to target
    please suggest some way to meet the reqirement
    thanks
    jhansi

    Hi,
    Here is the reason i need to do this:
    The data is loaded by DTP in process chain. Overlaping requests are deleted. But, iIn some cases requests with the same selection options  need not to be deleted. My idea was to change selection options in Manage(infocube) with Abap program without changing selection options in DTP filter,  so that the system would not recognize requests as "overlaping requests".
    So, where is the information about shown in the field Selection Options is stored? In which tables?
    Thanks
    Tigr_Z

  • Tabular model column rename with special characters - ), *, /, +, %, [ etc

    I am working in tabular model 2012. I have requirement to rename the column names with special characters like ), *, /, +, %, [ etc. When I try to rename in my model, it gives me below error:
    I also tried renaming the columns after creating a new test model with no luck. I may have lived with this error however we have another tabular model which contains special charaters in the name. This makes me believe that there must be some setting that
    I am missing.
    I tried changing the column name in other model having some special characters and it takes it.
    I have gone through this link#
    https://connect.microsoft.com/SQLServer/feedback/details/802009/ssdt-ssas-tabular-column-name-with-special-characters
    and
    http://msdn.microsoft.com/en-us/library/gg492144(v=sql.110).aspx which says that special characters are not allowed in column names however I am able to do it in one of our
    models then why not others.
    Any help is appreciated! Thank you for you time.
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

    Well Mr. Google helped me.. I got the solution:
    Databases of a specific modality and compatibility level can have object names that include reserved characters. Dimension
    attribute, hierarchy, level, measure and KPI object names can include reserved characters, for tabular databases (1103 or higher) that allow the use of extended characters.
    How to change the compatibility, just right click on the .bim file from SSDT and go to properties and change the compatibility to 1103. 
    I hope this will help someone. :-)
    Useful MSDN Links: 
    http://msdn.microsoft.com/en-us/library/bb522632.aspx
    http://msdn.microsoft.com/en-us/library/jj674204.aspx
    If this post answers your query, please click "Mark As Answer" or "Vote as Helpful".

  • Need help w/ setting up ports to run a server for America's Army

    Need help w/ setting up ports to run a server for America's Army. I read wat u need to change the ports but i dont understand wat to put. here is wat the site says
    Q: How do I run my own server?
    A: Quick and dirty server info:
    1. Edit RunServer.bat to change the map.
    2. Run RunServer.bat
    Or:
    server.exe LAN MAPNAME.aao (Host a LAN game)
    server.exe global MAPNAME.aao (Host a Public game)
    Also: When you create a server setup and want to allow other users to join your server, you need make sure the following ports are open for outgoing and incoming traffic in your firewall: 1716 (UDP), 1717 (UDP), 20025-20045 (TCP), and 20047 (TCP). Failure to open these ports will prevent the server from accepting connections from other players or prevent other players from being able to see your server online.
    There are several settings that also need to be defined in your server configuration INI file (in the Windows version, these files are located in “My Documents\America’s Army Server Settings\{settings file name}.ini”).
    [Engine.GameEngine]
    ServerActors=Andromeda.AndromedaMBS
    [Andromeda.Andromeda]
    GameServerIp=
    Make sure that you set the actual IP address of the America’s Army Server under GameServerIp= (for example, “GameServerIp=000.000.000.000”). The supplied address must be your actual internet IP address, if this is left blank or you supply the IP address for your internal network (such as 192.168.0.x), your server will not be able to accept connections from the internet.
    If your server.ini file contains the setting shown below, please change the QueryPort setting to 20025. This setting can also be removed, as the default setting is port 20025.
    [Andromeda.AndromedaMBS]
    QueryPort=20025
    Punkbuster user fix correction.
    If [Engine.GameEngine] block has been changed to read as below:
    [Engine.GameEngine]
    ServerActors=IPDrv.AndromedaMBS
    Please add the following block to your INI file:
    [IpDrv.AndromedaMBS]
    QueryPort=20025
    (Last Updated: 2006-04-20)

    Your images are not stored in the catalog. They are stored in folders on your computer. If you imported images that were already on your computer using the "Add" Option they are still in that same folder. If you imported images from your camera then they are in the folders that you specified when you imported. The catalog points to those images wherever they are located, and records all of the adjustments that you make to the image. When you send an image to Photoshop for further editing and save that image in Photoshop, it is normally saved back in the same folder as the original image.
    Images are not "saved" in Lightroom. The basic default workflow in Lightroom is to store all of the adjustments in the catalog, leaving the original image completely unmodified. The catalog becomes the central controlling mechanism. It is a database that contains pointers to where the images are located and a record of all adjustments made to those images using Lightroom. Properly managed, you only have those original master files and secondary files for the ones that you have sent to Photoshop for further adjustment. When you want to provide a copy for someone else, you use the export dialogue for that purpose. I often export JPEG images to share with others or to post on the web. After I have usedthe JPEG for its intended purpose I delete it.

  • Problems with replace file name with starting and ending Bates number

    When applying Bates numbers to a set of Acrobat pdf files I am unable to replace file names with the starting and ending Bates number. This is important
    for me in a legal application.
    The Bates numbers are applied to each page of each of file without any problem as required.
    The Bates log file indicates that the files have been renamed as I wanted.
    I am running Adobe Acrobat Professional 9 with the update to 9.1.9 and Windows XP Service Pack 3 (the last or current service pack)
    In all other respects Adobe Acrobat 9 is running to my satisfaction.
    Has anyone else had this problem and found a solution?
    HRKExon

    Thanks for asking the question, I hadn't heard of Bates numbers before and this gave me a chance to look up something new.
    When I googled for ' bates number legal index ' I found this document:
    http://www.adobe.com/devnet/acrobat/pdfs/batesnumbering9.pdf
    Maybe that will help.
    Scott Bonacker CPA
    Springfield, MO

  • Shared photo-stream, makes long file names with 42 random characters

    Windows icloud 3.1, in a shared photo-stream, makes file names with 42  random characters long. It didn't do this in iCloud  2. I have installed  iCloud 3.1 on a windows 8.0 and 8.1 machine and two Windows 7 machines.  They all do the same thing.  It used to give me file names like  "IMG_0001.jpg" now it gives me random file names like  "01a9fc3363330464233a142486180f0c1622eb9fca.jpg" all the pictures are  out order.
    Does anyone have fix for this? Does any one else have this  problem? I have posted this before and know one else that uses windows  seams to have this problem exect me. I did call Apple and they did some  research and bumped me up to senior  techs and eventuality Apple told me this is working the way it was  designed to. This is extremely stupid, I need the sequential file names  so the pictures will sort correctly.

    I have never found a solution for this.
    I did find a Work Around. What I do when I receive a folder full of pictures from another ios iPhone user, I copy all the photos as a batch from the PhotoStream folder into a free Windows program called "FastStone Photo Resizer" from www.FastStone.org. This program allows you to resize the photos as a batch to what ever size you wish. In my case I resize them to 2560 x 1440 which fills my 27" monitor and reduces the file size of each picture from 2MB or 3MB down to about 450 KB without degrading the picture as far as what you see on the screen.
    This program will also within the same batch operation, allow you to sort the pictures by "Date Taken" which is the Date and Time the picture was taken. It gets this information from the EXIF data in the jpg file. This program will then rename the files with different numbering format options including date, time, alphanumberic and with just simple numbers starting at what ever number you wish to start with. I can get files that look like this again "IMG_0001.jpg" and have all the pictures in the correct order that they were taken. At this point, I save the pictures directly to a folder on my PC. The cool thing about this is, all the EXIF data is preserved as well. I can process a 100 pictures in less that 60 seconds. I hope this helps. For me, I can now live with this iCloud numbering defect.

  • Generating file name with date

    Hello,
    I try to create via ABAP a file name with date in it. Normaly my script must run but the script won't run. Please help. Thanks.
    data = sy-datum.  " = data set to sys date
    data+6(2) = '01'. " = first day of month
    data = data - 1.  " = last day of last month
    file name creation
    p_filename+0(21) = '/sapio/flatfiles/xxx/'. " = first part of file name
    p_filename21(6) = data0(6). " = second part of file name
    p_filename+27(15) = '_XXXX_XXXXX.csv'. " = last part of file name
    p_subrc = 0.
    Regards, Thomas

    Hi again!
    Now I try it with your hints but now I got a save error.
    program conversion_routine.
    * Type pools used by conversion program
    type-pools: rsarc, rsarr, rssm.
    tables: rsldpsel.
    * Global code used by conversion rules
    *$*$ begin of global - insert your declaration only below this line  *-*
    * TABLES: ...
    * DATA:   ...
    data: data like sy-datum.
    *$*$ end of global - insert your declaration only before this line   *-*
    form compute_flat_file_filename
         using p_infopackage type rslogdpid
      changing p_filename    like rsldpsel-filename
               p_subrc       like sy-subrc.
    *       Insert source code to current selection field
    *$*$ begin of routine - insert your code only below this line        *-*
    * Datum wird gebaut
    data = sy-datum.  " = data set to actual date
    data+6(2) = '01'. " = first day of month
    data = data - 1.  " = last day of month before
    v_date = data+0(6).
    * Dateiname wird gebaut
    p_filename = '/sapio/flatfiles/XXX/'v_date'_XXXX_XXXX.csv'.
    p_subrc = 0.
    *$*$ end of routine - insert your code only before this line         *-*
    endform.

Maybe you are looking for

  • Can I Boot my PB from a Firewire 800 External HD?

    I'm a going to buy a portable external HD for my mirror (clone) back-up drive. I can buy either a Firewire 400 ("Combo case") or 800 ("Triple case") HD. My inclination is to buy the Firewire 800 ("Triple case") drive as it will be more useful in the

  • Just updated iphone 4s to ios7 and now itunes wont recognise my device.

    Before updating my iphone, itunes on my mac was easy to use and always recognised my phone. Now i cant even get itunes to recognise my iphone. It had pop ups saying that the phone is locked with a passcode and then i unlocked it and now its saying "i

  • Hard drive dead with iweb site inside.  new iweb site replaced my old site!

    Is the old site a gonner? I had published the site with a personal domain, hosted with mobile me. When adding a new site, iweb replaced my old one. the old one was my business portfolio. the new one is just a single property advertisement. why dont I

  • Storing my catalog on separate fast internal drive...?

    I'm curious as to whether certain performance issues with Lightroom 4 are related to my setup...I am on Windows 7, 12GB RAM, 2 750GB 7200rpm hard drives (internal) and several external drives. The way I have it set up is: C: - Where Lightroom is inst

  • Reg: Calling an ecatt script in R/3 function module

    Dear Freinds Can Anyone of you tell me if an ecatt script can be called inside an r/3 function module. if yes, please explaion me how it can be done. If you have any example code it will be quite useful for me. Points will be rewarded for suitable an