Add arabic file names to ZipOutputStream problem

Dear All,
i have problem with add arabic file names to ZipOutputStream problem my sample code :
zipOutputStream.putNextEntry("عربي.txt");//some arabic text
the zip file created successfully and contain files but the files in the zip file with name '??????????.txt'.i use many character set to encode arabic file name such as utf-8,windows-1256,iso-8859-1,IBM437 but the name changed to someting cannot understand lik '_د_س_ذ_د_ز ___«___è_ر1.txt' or '??????????.txt'.
is there anyone to help
with regards
Wa'el Abu Rahmeh

Its a warning. You can ignore it, and your program will run correctly.
To get the full details, follow the instructions and run it with Xlint:
javac -Xlint:unchecked beans\CustomerManager.javaProduces this error message:
beans\CustomerManager.java:19: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.List
            rv.add(getCustomer(String.valueOf(i)));
                  ^
1 warningIt is a Java1.5 specific warning because you are not using the new Generics info with the collections.
Here is the version that compiles with no warnings whatsoever.
package beans;
import java.util.ArrayList;
import java.util.List;
public class CustomerManager
    public List<Customer> getCustomers()
        return generateCustomers();
    private List<Customer> generateCustomers()
        List<Customer> rv = new ArrayList<Customer>();
        for (int i = 0; i < 10; i++)
            rv.add(getCustomer(String.valueOf(i)));
        return rv;
    public Customer getCustomer(String id)
        return new Customer(id, id + "First", "Last" + id,
            "123 Caroline Road Fooville");
}Basically the change was everywhere you have List or ArrayList replace it with List<Customer> - meaning you have a List of customer objects, rather than just a List of "anything"
If you are compiling with jdk1.5, then anywhere you use a Collection without specifying the types in this manner, it will create a warning.
You can ignore the warning if you so wish, and the program should run fine.
Cheers,
evnafets

Similar Messages

  • WEBUTIL: Uploading files with arabic file names to a BLOB column in DB

    Hi
    I'm using webutil (webutil_file_transfer.client_to_db_with_progress)
    to store files in a blob field in a 9i database, I'm doing that using forms 9i.
    I'm successful in storing files with English names in the database, however if I want to store a file with an arabic file name , it doesn't get uploaded and the BLOB is empty. Is there any work around to solve this problem.
    I tried renaming the arabic file name to an english file name then uploading which was fine, but when I try to rename the file back to arabic, this step fails. I asked a friend and he said that although I'm renaming the file back to arabic in a statment after uploading, that doesn't mean that the upload has finished, i.e the file is still locked for upload that's why I can't rename it back to arabic, I can't rename it even if I try that directly from the operating system.
    can anyone help in solving this problem!!
    Regards

    Hi
    I'm using webutil (webutil_file_transfer.client_to_db_with_progress)
    to store files in a blob field in a 9i database, I'm doing that using forms 9i.
    I'm successful in storing files with English names in the database, however if I want to store a file with an arabic file name , it doesn't get uploaded and the BLOB is empty. Is there any work around to solve this problem.
    I tried renaming the arabic file name to an english file name then uploading which was fine, but when I try to rename the file back to arabic, this step fails. I asked a friend and he said that although I'm renaming the file back to arabic in a statment after uploading, that doesn't mean that the upload has finished, i.e the file is still locked for upload that's why I can't rename it back to arabic, I can't rename it even if I try that directly from the operating system.
    can anyone help in solving this problem!!
    Regards

  • Edit 'Add to file names'

    I am a complete Newbie to Applescript but I'd like to try and generate a script which does the following:
    - use all selected items in the Finder (image files)
    - show a list with several options for names and events
    - let me select from the list
    - add the name of the choice (eg. "Christmas" or "mom's birthday") to the end of the filename, but before the extension (so that I dont get files with .jpgChristmas as an extension). I would also be ok to first remove or hide the extension to avoid this problem.
    I have been looking at the 'Add to file names' Applescript sample script and I think it should be doable to edit it to do what I mentioned above. I figured I should use
    tell application "Finder" to set ItemList to selection
    to do the first step, namely use only selected items in the finder instead of the whole folder (as the sample script does).
    After this I get quite lost in the documentation... is there anyone that could help me out?
    Thanks a bunch!

    You can get the name and name extension properties of an item and use that to break the name apart, for example:
    <pre style="
    font-family: Monaco, 'Courier New', Courier, monospace;
    font-size: 10px;
    font-weight: normal;
    margin: 0px;
    padding: 5px;
    border: 1px solid #000000;
    width: 720px;
    color: #000000;
    background-color: #DAFFB6;
    overflow: auto;"
    title="this text can be pasted into the Script Editor">
    property theOptions : {"Christmas", "Mom's birthday"}
    property divider : "_" -- a divider between the name and the suffix
    set suffix to (choose from list theOptions with prompt "Choose a name suffix:" with empty selection allowed) as text
    if suffix is in {"", "false"} then return -- nothing added
    tell application "Finder" to repeat with anItem in (get the selection)
    set {theName, theExtension} to {name, name extension} of anItem
    if theExtension is in {missing value, ""} then
    set theExtension to ""
    else
    set theExtension to "." & theExtension
    end if
    set theName to text 1 thru -((count theExtension) + 1) of theName -- the name part
    set name of anItem to theName & divider & suffix & theExtension -- rename
    end repeat
    </pre>

  • How can i add a file name(the text of the file name) as a child node to existing node in a treeView1 ?

    bool exists = false;
    TreeNode newNodeParsed = null;
    TreeNode rootNode = treeViewMS1.Nodes[0];
    TreeNode nextNode = rootNode;
    string f = Path.GetFileName(txtUploadFile.Text);
    TreeNode subnode = new TreeNode(txtDir.Text);
    TreeNode filename = new TreeNode(f);
    if (!txtDir.Text.Contains("/"))
    foreach (TreeNode node in rootNode.Nodes)
    if (node.Text == txtDir.Text)
    exists = true;
    break;
    if (exists == true)
    subnode.Nodes.Add(f);
    else
    rootNode.Nodes.Add(subnode);
    subnode.Nodes.Add(f);
    The rootNode is the root directory in the treeView1
    subnode is a node inside the root. For example the subnode name is manuelisback
    I'm checking if the subnode exist i want to add the file for example (lightning1.jpg) to be under subnode.
    If the subnode is not existing add the subnode to the root and then add the file name lightning1.jpg under the subnode.
    But the file name is never added under the subnode:
    I added manualy the lightning1.jpg under test.
    But the lightning1.jpg also should be added to be under manuelisback. There should be two lightning1.jpg here.
    One under manuelisback and one under test. The one under test i added manualy from my ftp server.
    But the one i want to be under manuelisback i'm trying to add from my program and it dosen't add it to there.
    And when i'm using a breakpoint i see on subnode the text manuelisback and i see on f the text lightning1.jpg

    If I understand your question correctly, you might want to try changing:
    if (!txtDir.Text.Contains("/"))
    foreach (TreeNode node in rootNode.Nodes)
    if (node.Text == txtDir.Text)
    exists = true;
    break;
    if (exists == true)
    subnode.Nodes.Add(f);
    else
    rootNode.Nodes.Add(subnode);
    subnode.Nodes.Add(f);
    to something like:
    if (!txtDir.Text.Contains("/"))
    foreach (TreeNode node in rootNode.Nodes)
    if (node.Text == txtDir.Text)
    subnode = node;
    exists = true;
    break;
    if (exists == true)
    subnode.Nodes.Add(f);
    else
    rootNode.Nodes.Add(subnode);
    subnode.Nodes.Add(f);
    rootNode.Nodes.Add(f);
    It would be greatly appreciated if you would mark any helpful entries as helpful and if the entry answers your question, please mark it with the Answer link.

  • AppleScript "Add to File Names.scpt" (in Finder Scripts) adds "Prefix" to end of files rather than adding actual prefix?

    This may be a quirk with my setup, but when the file "Add to File Names.scpt" runs in Mavericks "Prefix" is appended to the end of filenames rather than the term I would like to be added as a prefix...unsure if this can be reproduced on other comptuers? Similarly, as a test, if a term is intended to be added as a suffix to a file name then "Suffix" is appended to the end of a file name - rather than the term.
    If this is a bug is there a fix?
    Thanks

    apparently this is a bug with a workaround as described here:
    https://discussions.apple.com/message/24085265#24085265

  • How to alter 'add to file names' script?

    I'm working on some stuff that I need to get done today, and it dawned on me that I could save a lot of time if I had a certain script perform a simple task for me. Unfortunately I haven't been able to get one to work right. I just want to be able to add the same thing onto the end of a file name... For instance, 01.jpg would become 01x.jpg, 02.jpg becomes 02x.jpg and so on. The basic 'Add to File Names' script will almost work, but it adds to the front of the name, not the back. Does anyone know how I could alter the lines in that script to get it to do what I want?
    Thanks for any help,
    Dave

    01. Under 'Alternative 01:', the line ...
    No error checking for folders is included. Such is an exercise for the student.
    ... should have been ...
    --No error checking for folders is included. Such is an exercise for the student.
    02. The error message ...
    "System Events got an Error: NSCannotCreateScriptCommandError".
    Hmmm, those replying are using MacOS X 10.4.x, and you are using MacOS X 10.2.x. Others, with Macs running MacOS X 10.2.x and using AppleScript code from MacOS X 10.3.x and later, do at times experience 'NSCannotCreateScriptCommandError' error messages.
    In the code below, 'System Events' was replaced with 'Finder'. Some additional editing was performed, where required.
    Alternative 01:
    property tAddition : "x" -- The charcter or string to append to the files' name.
    tell application "Finder"
    set tSelection to selection
    --No error checking for folders is included. Such is an exercise for the student.
    repeat with i in tSelection -- Cycle through the provided files.
    set {displayed_name, name_Extension} to {displayed name of (i as alias), name extension of (i as alias)}
    if ((displayed_name ends with name_Extension) and ((count name_Extension) > 0)) then
    -- Handle file names which include a name extension.
    set (name of i) to ((get (characters 1 through ((count displayed_name) - (count name_Extension) - 1) of displayed_name) as string) & tAddition & "." & name_Extension)
    else
    set (name of i) to (displayed_name & tAddition) -- Handle file names without a name extension.
    end if
    end repeat
    end tell
    Save the AppleScript code as a script.
    Move file (or a copy or alias of the file) to the '~/Library/Scripts/' folder.
    Select files to be processed, in 'Finder'.
    Select the script, via the 'Script menu'.
    Alternative 02:
    property tAddition : "x" -- The charcter or string to append to the files' name.
    on run {} -- User double-click on the applet.
    display dialog "Drag file(s) onto applet for processing."
    end run
    on open selected_Items -- User dragged items onto applet.
    my handleitems(selectedItems) -- Processed items dragged onto applet.
    end open
    on handleitems(localItems)
    -- No error checking for folders is included. Such is an exercise for the student.
    tell application "Finder"
    repeat with i in local_Items -- Cycle through the provided files.
    set {displayed_name, name_Extension} to {displayed name of i, name extension of i}
    if ((displayed_name ends with name_Extension) and ((count name_Extension) > 0)) then
    -- Handle file names which include a name extension.
    set (name of i) to ((get (characters 1 through ((count displayed_name) - (count name_Extension) - 1) of displayed_name) as string) & tAddition & "." & name_Extension)
    else
    set (name of i) to (displayed_name & tAddition) -- Handle file names without a name extension.
    end if
    end repeat
    end tell
    end handle_items
    Save the AppleScript code as an applet (application).
    Drag files to be processed, onto the applet, in 'Finder'.

  • Exporting as jpeg with use artboards adds to file name

    When I export from Illustrator CS5 with "Use Artboards" checked it adds a "-01" to the end of my file name before the extention. I'm assuming that its because its artboard #1 or something. It happens with the all or the range button checked. It doesnt show the -01 when you are saving the file name. This is pretty annoying because I have to go back and re name the files when this happens. Any advice? Thanks!

    Same problem, Gex.
    Been trying to get this resolved for months with no joy. I have recently produced over 250 brand logos for a large multi national, all of which have to supplied in various formats and file types including .jpg. I too use only one artboard and since I don't want the logos cropped tight to the image, I check "use artboard" with the result that I get logoname-01.jpg on every file.
    It may not seem to be too much of a sweat to then delete the offending -01 from the resulting file name, but when you have to do this repeatedly it is extremely tiresome... and so unnecessary!! I too do not want, or need, to append the file name with anything at all.
    I really am at a loss to know why, if i have one artboard (AND ONLY ONE) it has to have a number at all. With 2 or more artboards, sure, it may be useful to identify each, but with 1... that is it, that is all there is. The only one. One of one. No more, no less. Very little chance of confusion i would have thought!
    So, Adobe can we have a radio button (or preference) along the lines of: "add pasteboard number" or "remove pasteboard number" or perhaps a more enlightened soul at Adobe can respond with a workaround (unlikely, it is Adobe after all!).

  • Add source file name to output table

    Hi, I am trying to pull data from Azure blob to On Premises SQL Database. I have emp file that have three columns (Id, FirstName, LastName) and SQL table has five columns (Id, Firstname, LastName, SourceFileName, Lastmodifieddatetime). Is there any way to
    map SourceFileName and Lastmodifieddatetime in the Azure Data Factory.
    Thanks,
    Gaurav

    OK, got it. The file name iws not updated until the file is closed and opened.
    I will add the variableto the topics in question.

  • Can I add the file name and page numbers to multiple pdfs automatically?

    Hello.  Thanks first for taking the time to read this!  We are a small non profit hospice.  Looking to take a large amount of files and put the patients last name (which is the file name) and a page number on the footer of every page of every document.  For example.  File Name Smith.  Smith 1 Smith 2 Smith 3 etc.  However I like to be able to do this to multiple files at once and not have to open each one up.

    Go to Advanced - Document Processing - Batch Processing...
    Click New Sequence and give it a name.
    Now select the sequence you've created, click Edit Sequence, click Select Commands.
    Select Execute JavaScript from the left-hand side, and click Add.
    Now select it on the right-hand side and click Edit.
    Paste the code from my previous post into the window, and click OK twice.
    Now, back in the Edit Sequence window, select the folder you want to run the batch on, and the output folder. Be aware that if you choose the same folder, the original files will be overwritten, so you might want to use a different one.
    Under Source File Options, deselect everything.
    Click OK.
    You're now ready to run the batch sequence!

  • Arabic file name in the dowload-window

    I am using the following code to download a file
    the code is working fine if the file name has only english or alphanumeric data , in case the file name is arabic , the download window displays a wrong file name.
    res.setHeader("HTTP_ACCEPT_LANGUAGE", "ar-sa");
    res.setHeader("Cache-Control", "public");
    res.setHeader("Pragma", "public");
    res.setHeader("Content-Disposition","attachment; filename=\"" + name + "\"");
    res.getOutputStream().write(byteArray);
    res.getOutputStream().flush();any idea?

    Thanks , I used the URLEncoder and it is now working fine,
    ( java.net.URLEncoder )
    res.setHeader("Content-Disposition","attachment; filename=\"" + URLEncoder.encode(name,"UTF-8").replaceAll("\\+"," ") + "\"");~Suhaib

  • How do you add the files name to images within a PDF

    I have been searching the web trying to find an answer to this question, I am not sure what the proper term is called, but I refer to it as a 'coded pdf'. Hopefully someone knows what I am talking about and can help me find an answer!
    The end product is a coded PDF that has the file name of all the images lableled on top the image. For example, a product brochure that has 500 images, all of them would be 'coded' with their file name, to find easy in source files. - Is this an export option in InDesign, or an option somewhere in Acrobat?
    Thank you in advance for any help.
    -Melissa

    No, Melissa's asking for a filename that's searchable - text made of pixels is no use.
    Acrobat cannot apply the original image filenames after the PDF has been created as it can't read the information from anywhere. You have two options, both in InDesign:
    use smart captions to add the name of the file in a visible format beside each image.
    use accessibility tagging and place the image filename in the ALT TEXT field, then export the PDF with tags enabled (the filename will not be visible on the page but will show if you hover your mouse over the image).

  • File name length causing problems

    I want to use my iPod suffle as a data transfer device as well as a MP3 player and am havign real problems copying folders onto it from my iBook or my desktop G4. Is it the file name lengths that are the pprblem (that's certainly the error message I get sometimes). Or the volume of data that I am trying to copy in one hit (400MB-worth)?

    It seems there is no restrictions in filename's maxlength.
    However, if you check the section 2.3 of this link
    [http://www.faqs.org/rfcs/rfc2183.html|http://www.faqs.org/rfcs/rfc2183.html]
    It says:
    It is important that the receiving MUA not blindly use the suggested
    filename.  The suggested filename SHOULD be checked
    (and possibly changed) to see that it conforms to local filesystem conventions,
    does not overwrite an existing file, and does not present a security problem
    (see Security Considerations below).I tried to test filename's maxlength with different browsers and found that results differ with browsers.
    The HTTP response header nevertheless contained the full filename.
    Above all, IMO avoiding long filename is the best solution.

  • Odd add'l file names in ripped iTunes folders (like "._01 songname.mp3")

    Lately when I rip from my iMac into a shared iTunes library from which I also sync Windows computers, I see files like "._01 songname.mp3" in addition to "songname.mp3". These odd files are very small. I also rip on my Windows PC -- these don't seem to create those files. Then, I've been copying them to SD cards to copy to the HD in my new car stereo and then end up there, but are not playable. What are they? Do I need them at all? Can I delete them on my file server? (I know I can delete them on my SD card and car HD.) But, what are they and can I delete them all over?
    Thanks for any ideas.
    -Bruce
    PS: I've seen files before called "albumart" something when I've ripped a CD and there was no artwork for it in the iTunes store and I copy something from say the Amazon store.

    Matt,
    When you burn the MP3 CD with iTunes, it names each file on the CD as "number title," independent of what the original file name was. The number corresponds to its position in the playlist from which you are burning. (It does not modify the filename on your hard drive.)
    I believe that will accomplish the sequencing you are looking for. Give it a try and let us know.
    Ed

  • File Name Changes, Sorting Problem

    Hi,
    iTunes 10.5.1
    MacBook Pro Snow Leopard
    I am attempting to add a series of lectures to iTunes. These number about 100 and are sequential over 3 volumes. I obtained them in simple forlders labeled vol1, vol2 and vol3 and each track is named with a prefix such as "V1 Ch03 Relation of Physics to other Sciences.mp3". Oddly about half actually retain the full name and sort out properly but the rest do not. For instance the example in question becomes " Relation of Physics to other Sciences.mp3" and not sorting tricks can get them in order.
    Before I starting fooling with the names is there somethign else I can do? I have turned off "automatically check for track names" option on iTunes but the same result. Are the spaces causing problems? I don't want to change the names as I would like to share these and others won't figure out the sequence.
    There doesn't seem to be an option for date created sorting which may solve the issue. Also iTunes seems to be reading some meta data as the "album name" changes. It seems the lectures were originally released in a different series and recently compiled in the order created, the latter being preferrable.
    Any help appreciated!
    Happy Holidays!
    Warren

    Oops, Just realised I put this n the wrong forum. Just to clarify this is prerecorded video files.

  • Strange and fatal file name / root folder problem. Please help!

    Hi there. I wonder if anybody could help me!
    I am using CS4 but this problem still occurred in CS3. When I
    set up a new site in Dreamweaver I go through the usual motions
    selecting the local root folder and images folder. Then when I go
    into the new site it creates an initial site cache as usual. After
    this (when I try to upload anything for example) the cache seems to
    have disappeared (i.e. all local files disappear in DW). It tells
    me that I should go through setting up the site process again but
    this only ends up going round in circles!
    Curiously, when I look at my HD in finder, Dreamweaver has
    created a new folder named "Macintosh HD" and inside it follows the
    exact same file structure as the "real" local files except the
    website files do not exist inside the root folder!
    I can not understand what is going on here. I suspect it
    might be something to do with the locations of files and relative /
    absolute linking on the HD?
    Please help if you can! Thanks.

    What is the NAME of your hard drive? Does it (or any
    intermediate folder)
    contain unusual characters (apostrophes, parentheses, etc.)?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "mikrokosmonaut" <[email protected]> wrote
    in message
    news:gkpsts$b9t$[email protected]..
    > Hi there. I wonder if anybody could help me!
    >
    > I am using CS4 but this problem still occurred in CS3.
    When I set up a new
    > site in Dreamweaver I go through the usual motions
    selecting the local
    > root
    > folder and images folder. Then when I go into the new
    site it creates an
    > initial site cache as usual. After this (when I try to
    upload anything for
    > example) the cache seems to have disappeared (i.e. all
    local files
    > disappear in
    > DW). It tells me that I should go through setting up the
    site process
    > again but
    > this only ends up going round in circles!
    >
    > Curiously, when I look at my HD in finder, Dreamweaver
    has created a new
    > folder named "Macintosh HD" and inside it follows the
    exact same file
    > structure
    > as the "real" local files except the website files do
    not exist inside the
    > root
    > folder!
    >
    > I can not understand what is going on here. I suspect it
    might be
    > something to
    > do with the locations of files and relative / absolute
    linking on the HD?
    >
    > Please help if you can! Thanks.
    >

Maybe you are looking for

  • Issues exist in release build that don't exist in debug build

    I've been working on a Flex 4.1 project and have recently noticed an issue that does not exist in the debug build.  Then when you export a release build and run it the issue appears.  This is the only change that's made that breaks it.  To me this se

  • Trouble connecting to MySQL

    I am new to this software and am trying to connect to a MySQL database on my webhost. I download the MySQL connector and created the server type. I go to add datasource and test the connection and am getting connection refused:connect. My connection

  • How to create a clickable row in a table

    hi all I'm trying to use the onclick prop of a tr elem in table. At the moment I'm using the same h:commandLink inside each column (td) I have. How can I place in the onclick tr prop. the same onclick funcion generated by the h:commandLink component?

  • Downloading Adobe Acrobat X for use with existing license?

    I have a license from a previously purchased version of Adobe X.  My new labtop does not have a disk drive.  Where can I download Adobe Acrobat X?

  • Stopping a payment

    How do I go about stopping a payment on my account