Replace not latin characters from file name.

Dear friends,
I tried a lot but even after reading the documentation about all the available CF functions I could not find a way  to accomplish this:
As you already know from my previous post I'm trying to finish an application which manages multiple images. I have reached a really good point and I was ready to implement the solutions you suggest on this post when the client did something marvellous. He uploaded some images named "Εικόνα 123.jpg" (Image 123.jpg in English) which actually broke the Flex application that retrieves the images because the firewall does not allow high bit characters to go through. I now need to add a function that will evaluate every character in the file name individually and it will remove or replace (I do not care) all the characters that are not latin or numbers (spaces, greek characters, special characters, etc). As I've already said no known function is able to do that (as far as I know of course) and I guess that the solution could be hiding in regular expressions which is not my strong point. So I need your help here.
Thank you in advance,
John

Thanks Ian,
I cannot figure out how to use asc() function for this. I will have to run a test in every single character and replace the invalid ones but I will never now the actual string length (how many characters each image name will have) and I will  possibly end up destroying the extensions (.jpg) as well. To make it a little more complicated let me tell you that I will have to run this twice. Once for the full image path (ie d:\company\aptown\images\Εικόνα 123.jpg) in which I will have to change only the ...Εικόνα 123... part and not anything else, and once for a comma separated list of the image names (ie Εικόνα 123.jpg, Εικόνα 124.jpg, Εικόνα 125.jpg, Εικόνα 126.jpg). And don't be misleaded from the pattern. The customer may upload an image named with a complitely different way using invalid characters though, for example "Αντίγραφο της Εικόνας 123.jpg" (Copy of the image 123.jpg in English).
Seems to be impossible ,
I hope it is not.
Yannis

Similar Messages

  • Remove LF characters from file names

    I have a folder full of files with filenames that contain LF character (ASCII code 10).  I want to use Automator's "Replace Text" funcion to remove these non printing characters from file names.  Is there a way to do it?
    If automator is not able to do this task, I will take a bash script or applescript solution as well...

    Take a look at: http://stackoverflow.com/questions/4417588/sed-command-to-fix-filenames-in-a-dir ectory
    (I changed  tr -d "\r\n" to tr -d "\n", but try both)
    for f in ~/Desktop/*
    do
        new="$(printf %s "$f" | tr -d "\n")"
        if [ "$f" != "$new" ]; then
            mv "$f" "$new"
        fi
    done

  • The File name property is not valid. The file name is a device or contains invalid characters

    I have an SSIS task that has run successfully for years. They just moved the dtsx to a new server and now it is failing. 
    Issue:
    The task has a data flow that writes a raw file destination. It then has a subsequent data flow that reads the raw file destination. 
    The path and name of the raw file is passed to each of the data flows via the same variable. 
    The raw file resides in a folder on the server in the same path that the dtsx resides in. 
    The task fails with the "The File name property is not valid. The file name is a device or contains invalid characters" error when trying to access the raw file.
    What we have done to troubleshoot:
    1. I ran the task successfully on my local machine so it is definitely a server issue.
    2. The first thing we were seeing was that it failed trying to write to the raw file. The task is set to "Create Always". 
    3. We saw that the dba's copied over the entire directory structure from the old server which included a previously created raw file, so we deleted the raw file.
    4. We reran the task and it successfully wrote a new raw file but then failed on reading the raw file with the same error as above.
    5. We reran the task AGAIN and this time it failed trying to write the raw file throwing the same error as above.
    6. The dba looked at the directory and the account that performs the task has full control.
    7. The dba looked at the raw file that was created and verified that the account that performs the task has full control of the file and that it is the owner of the file.
    Summary:
    The task fails when trying to access the file EXCEPT when the file does not exist. In that situation it can write the file but subsequently fails in accessing it again.

    Hi Whalensdad,
    Based on my research, the issue can be caused by the following reasons:
    There are some invalid characters in the File name at package runtime. In this scenario, just as Russ said, could you please post the value that is in the File name variable? Also use a Script Task with Messagebox.show to show the variable values at runtime.
    May be it changes to others at run time.
    The account runs the package not having access to all the folders in the path. Since you are moving the dtsx file from one server to the current server, do you also move the raw file to the same folder in the current server? Does the user runs the package
    have access to all the folders in the path? To solve this, please ensure that the user has access to all folders and the raw file in the path on the current server.
    Thanks,
    Katherine Xiong
    If you have any feedback on our support, please click
    here.
    Katherine Xiong
    TechNet Community Support
    Please see the response above. I can't use a message box on a server so I logged the values to the database. The resource account has full control to the folder. I haven't been able to get the DBA to check the SQL Agents permissions, but I was always under
    the impression that if you use "Run As" on the task, it will not use the SQL Agent but the account you identify it to "Run As". The "Run As" account has full control on the folder and file.

  • BIG PROBLEM: CSS files not loading because of international characters in file name

    I have Muse Beta 7 in Spanish.
    The program creates a css file called master_a-página-maestra.css in css folder. It is referenced in the resulting HTML code here:
    <!-- CSS -->
      <link rel="stylesheet" type="text/css" href="css/site_global.css?3951792836"/>
      <link rel="stylesheet" type="text/css" href="css/master_a-p%c3%a1gina-maestra.css?fileVersionPlaceholder"/>
      <link rel="stylesheet" type="text/css" href="css/index.css?3948175564"/>
    When you work locally in your Windows formatted har drive, everything looks fine, but when you upload your files to a server, everything is screwed up. The server doesn't recognizes the URL and returns an error page, resulting in style errors in the entire site.
    This can also happens with html files if the title of the page contains international characters or with images if the image file name in your Hard Drive contains international characters.
    I already pointed out long time ago Muse was generating file names with international characters like á, ñ, etc but nobody cared about it. Too bad. I had to activate file name customization but I think that Muse should replace automatically this characters in the same way that it replaces other conflictive characters like commas or ampersands.
    This is not a fault of the FTP client. Accented characters are not web safe regardless of the FTP client you are using. It is a server side issue. Some servers support it some others don't. I don't mind if it works in Adobe Catalyst server because the final website is going to be in another server and maybe next year when paid hosting is ended the client may move it to another server.
    It makes more sense to replace accented characters in file names by their not accented equivalents ('a' instead of 'á', 'N' instead of 'Ñ', etc) and avoid all this problem.

    Zak, It is funny you mention it, because the site I am talking about is hosted in 1and1. try this: http://www.artofwalls.com/rosannawalls/biografía.html
    As you can see, the offending "í" in the file name causes 1and1 server to throw a "page not found" error. And this has happened with many other servers I have tried since.
    Muse boast of generating code fully compatible with all major web browsers but by using international characters in file names it ggenerates code suitable only for very few web servers. International characters have been always a no-no for internet URLs. Internet was designed by people who didn't care about ascii codes beyond 127 so using international characters in html file names is just call for problems.
    "to work with your hosting provider to determine how to enable Unicode encoded (UTF-8) file names and HTML files on their servers" is not a viable solution most of the time unless you are a Very Important Client of your host provider. If not, making changes means money for them and if you are the only one who complains, they are going to just tell you to not use international characters in your names.

  • Sqlldr does not understand unicode characters in file names

    Hello,
    I am trying to call sqlldr from a .net application on Windows to bulk load some data. The parameter, control, data, log files used by sqlldr, are all located in the C:\Configuración directory (note the unicode character in the directory name).
    Here is my parfile:
    control='C:\Configuración\SystemResource.ctl'
    direct=true
    errors=0
    log='C:\Configuración\SystemResource.log'
    userid=scott/tiger@orasrv
    When I make a call as
    sqlldr -parfile='C:\Configuración\SystemResource.par'I am getting
    SQL*Loader-100: Syntax error on command-line
    If I run it as
    sqlldr -parfile='C:\Config~1\SystemResource.par'I am getting
    SQL*Loader-522: lfiopn failed for file (C:\Configuraci├│n\SystemResource.log)
    If I remove the log= parameter from the parameter file, I am getting
    SQL*Loader-500: Unable to open file (C:\Configuraci├│n\SystemResource.ctl)
    SQL*Loader-553: file not found
    SQL*Loader-509: System error: The system cannot find the file specified.
    Can anyone suggest a way to handle unicode/extended ASCII characters in file names?
    Thanks,
    Alex.

    Werner, thank you for replying to my post.
    In my real application, I actually store the files in %TEMP%, which on Spanish and Portuguese Windows has "special" characters (e.g. '...\Administrador\Configuración local\Temp\'). In addition, you can have a user with the "special" characters in the name which will become part of %TEMP%.
    Another problem is that 8.3 name creation may be disabled on NTFS partitions.
    Problem #3 is that the short file names that have "special" characters are not converted correctly by GetShortPathName windows API, e.g. "Configuración" will be converted to "Config~1", but for "C:\ración.txt" the api will return the same "C:\ración.txt", even though dir /x displays "RACIN~1.TXT". Since I am creating the parameter and control files programmatically from a .net application, I have to PInvoke GetShortPathName.
    Any other ideas?
    Thanks,
    Alex.

  • The file name is not valid. The file name is a device or contains invalid characters.

    Hi ,
    I am getting below error in SSIS 2008 package when it is run through control-m
    The file name is not valid. The file name is a device or contains invalid characters.
    component "FF_SRC_InboundFidelityInputFile" (1) failed the pre-execute phase and returned error code 0xC020207E.
    although this package is working fine in dev environment from visual studio.
    control-m agent has proper permissions to the folder still it is failing. Please if anyone knows solution for this issue. I am working on this issue since more than a week but reached nowhere. Please help.
    Thanks 
    Paras Gupta

    Hi Paras,
    Based on your description, it is not the VS IDE issue, if it is related to the SSIS, I suggest you post the issue in this forum here:http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlintegrationservices
    , and there you would get better response.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Cloud does not disappear from file name?

    why does it take "forever" for the cloud to disappear from file name?
    I saved a numbers document to the cloud a half an hour ago, and the cloud is still there.

    HDash-Tech,
    thanks for the tip, but since I have my iTunes Library on a NAS I have to direct iTunes every now and than via "choose library" to the folder and it doesn't make a difference...
    I think it's somehow due to my iTunes Match.  I know they do not sync audiobooks, but they mess up pretty much everything else within my library.  Songnames here and there and especially cd covers!
    Any other idea how to get it straigten out again?
    Thank,
    Daniel

  • B2B identifying TP from file name and not Interchange

    We want B2B to identify trading partner from ISA/GS segment, but B2B is taking it from file name. We have property oracle.tip.adapter.b2b.edi.identifyFromTP set to "Interchange". As I understand based on the tip.property it should always take from the ISA/GS segment in dat file.
    We also have Trading Partner Identification Type set to EDI Interchange ID while setting up trading partner and it is set to the same value as Interchange Receiver Id in the Document Protocol.
    Anyone has any ideas?
    Thanks

    Hello Venkat,
    ideally this should work. Guess you have not restarted b2b after changing the tip.properties. If you still have issues, please raise an SR and also send the b2b.log in DEBUG mode.
    Rgds,Ramesh

  • Mail.app hang if mail attachment have special characters in file name

    Hello,
    I have upgraded to 10.5.1 from last version of Tiger.
    After upgrade is not possible send message with attachment which have a czech special characters in file name (like á, í, é, ý, ú, ů, ě, š, č, ř, ž) with Mail.app. If I try it, CPU is overloaded and I must kill Mail.app process.
    The same problem have my friends who are running a clear installation of Leopard 10.5.1.
    Thanks for correction.

    I have the same problem with Hungarian chars. I tried out Tomas suggestion and it really worked. It is so dissaponting to have this kind of bug in a system like this. They never tested against this situation.
    I hope somebody at apple read this discussion and somehow this will be fixed in the near future.

  • French Characters in File Names

    Hello,
    Despite my instance not use French and/or other special
    characters in files names, we have inherited a project (approx 2500
    topics) with French characters in the file name. When we generated
    the project and post it on an Apache server, the topics do not
    display as the server replaces the characters with symbols.
    RX5, during the generation process, replaced the French
    characters with underscores, RX 7.0.1 keeps the characters within
    the file name. In RX 7.0.1 is it possible to replace the characters
    with underscores during the generation process?
    Regards,

    If this is the other thread, then you did get a response, several in fact. It may not have been the answer you wanted but that's another matter.
    http://forums.adobe.com/message/129875#129875
    See www.grainge.org for RoboHelp and Authoring tips
    @petergrainge

  • "Itunesminiplayer.resources" is not a vaild short file name

    I am in need of some help big time... I had to have my computer replaced. I had Itunes on the computer before. Once I downloaded Itunes it was working okay, then it started telling me itunes was not installed properly and to reinstall, but would still open Itunes. Also it would not bring over the track names from the CDs I have. I did find the information on how to bring it over, but it did not work. So I decided to uninstall and start over. Itunes would not uninstall telling me intunesminiplayer.resources is not a vaild short file name and would not uninstall. So I deleted all of the files and tryied to install it again. It started the install process and stopped telling me itunesminiplayer.resources is not a vaild short file name. So now I am without Itunes all together. I have not had this problem before and have no idea how to fix it. Any help would be great!!! I have itunes on my computer at work and it did not give me any trouble when I downloaded it, but we have windsows 7.

    That generally indicates damage to the itunes.msi for your existing installation of iTunes, Nite.
    These sorts of msi-related troubles have gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for *at least version 3.0* of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove".
    Quit out of CleanUp, restart the PC and try installing iTunes 9.2 again. Does the install go through properly this time?
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • I have an older version of itunes on my L drive.  Everytime I try to download the newest version I get the error itunes.resources is not a valid short file name.  Now I obtained an iphone and cannot sync the phone to my account because it wants me to upda

    I have an older version of itunes on a separate drive.  Everytime that there has been an update to itunes it will not let me update.  Now I purchased an iphone and I hooked the phone up to the computer and it tells me I need to install the latest version of itunes.  I downloaded to try it, but I keep getting an error message that says itunes.Resources is not a valid short file name.  What can I do from here?

    That is a new one on me.
    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down the page in case one of them applies.
    The further information area has direct links to the current and recent builds in case you have problems downloading, need to revert to an older version or want to try the iTunes for Windows (64-bit - for older video cards) release as a workaround for installation or performance issues, or compatibility with QuickTime or third party software.
    Your library should be unaffected by these steps but there are also links to backup and recovery advice should it be needed.
    tt2

  • "not a valid short file name" and "invalid character" install errors

    Disclaimer: Apple does not necessarily endorse any suggestions, solutions, or third-party software products that may be mentioned in the topic below. Apple encourages you to first seek a solution at Apple Support. The following links are provided as is, with no guarantee of the effectiveness or reliability of the information. Apple does not guarantee that these links will be maintained or functional at any given time. Use the information below at your own discretion.
    Symptoms
    While upgrading or uninstalling a Windows software application (such as iTunes for Windows or QuickTime for Windows), you may receive one of the following error messages:
    file name is not a valid short file name
    The folder path 'folder name' contains an invalid character.
    ... where file name could be the name of any file, and folder name could be the name of any folder.
    In the case of software that uses advertised shortcuts (such as recent versions of iTunes for Windows or Safari for Windows), the messages may also appear when attempting to launch software that has already been installed.
    Resolution
    The error messages are usually caused by damage to the installation database for the application. Clearing the installation database for the application by using the Windows Installer CleanUp utility can usually get you past the error message.
    (1) Click [here|http://support.microsoft.com/kb/290301] first, and read the important information about the utility.
    (2) Click the *Download the Windows Installer Cleanup Utility package now* link on that page to download a file titled msicuu2.exe.
    (3) Open the msicuu2.exe file and follow the prompts to install it.
    (4) In your Start menu click *All Programs* and then click *Windows Install Clean Up.* The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (5) Select the software you're getting the "not a valid short file name" or "invalid character" message for from the list and click Remove.
    (6) Click OK in the confirmation dialog that appears.
    (7) If you have multiple entries for the software you're getting the "not a valid short file name" or "invalid character" message for, repeat steps 5 and 6 for the other entries for the software.
    (8) Click Exit.
    (9) Restart the computer.
    If you were getting the "not a valid short file name" or "invalid character" message when trying to upgrade or launch software, now try reinstalling the latest version of the software.
    If you were getting the "not a valid short file name" or "invalid character" message when just trying to uninstall software, program files for the software in question will remain on the PC after it has been removed by the Windows Installer CleanUp utility. If you want to remove leftover program files, check in at the appropriate forum at [Apple Discussions|http://discussions.apple.com/index.jspa?categoryID=1] and ask which files can be safely removed.
    This is the 1st version of this tip. It was submitted on March 24, 2010 by b noir.
    Do you want to provide feedback on this User Contributed Tip or contribute your own? If you have achieved Level 2 status, visit the User Tips Library Contributions forum for more information.

    Go to Microsoft website to fix installer file problems.
    Click "Run now" from Fix it to remove all iTunes & related installer files:
    http://support.microsoft.com/mats/Program_Install_and_Uninstall
    Be aware that Windows Installer CleanUp Utility will not remove the actual program from your computer. However, it will remove the installation files so that you can start the installation, upgrade, or uninstall over.
    Download and Install iTunes

  • Need help with EXS24 "read velocity range from file name"

    I am trying to import 127 drum samples to a single key using the option shown here. The option says "Map to key dropped on and read velocity range from file name". I can find no documentation in the manuals on how to do this. What is the syntax required in the file name to make this work? I need to do several of these imports. The capability is cleary there, but I need help on how the file name should be formatted. My thanks to anyone who can help.

    Hi
    Not a direct answer to your question, but if you are doing a lot of sample mapping etc, you may want to check out Redmatica's KeyMap Pro or the simpler Keymap 1:
    http://www.redmatica.com
    CCT

  • EXS24 read root key from file name only

    Has anyone encountered this with EXS24 in Logic 7? If you set preferences to "read root key from file name only" then EXS reads the root key from the file itself when loading samples. On the other hand if you set them to "read root key from file only" then it reads the root key from the file name. Or am I just imagining this?
    P.S. if anyone from Apple is reading, could you please update EXS24? It's a bit primitive by today's standards.

    Hi
    Not a direct answer to your question, but if you are doing a lot of sample mapping etc, you may want to check out Redmatica's KeyMap Pro or the simpler Keymap 1:
    http://www.redmatica.com
    CCT

Maybe you are looking for

  • Creating Page Format In Quality

    I want to create a new page format, for the purpose I did the following... spad-> Full Administration-> Device Types-> Page Format-> Change-> Create-> (Page Format=ZA4, Orientation=Landscape, Paper Size (Width=215 mm, Height=300 mm)) When I click on

  • FM to check if PR/PO is open

    Hi Guys, In my development i need to check before processing if a PO/PR document is opened and locked for editing .. can u please tell me if there is a standard FM that can help me? Thanks and BR, Cristian

  • 3rd week of MacBook ownership.. my observations and questions...

    Note: I have 2 main questions below.. if you don't want to read my thoughts, skip below... I bought a Black MacBook about 3 weeks ago from CompUSA.. 18 months no interest and an interested buyer for my windows laptop--I had to go for it. This is my f

  • No HDMI output whatsoever

    I'm using an ATI 3200 HD card (RS780 I think) and I've read through the forum and google with no luck. I've tried xf86-video-ati and radeonhd AND radeonhd-git with the same result. xrandr detects the connection but changing resolutions and positions

  • FTP Then Access Denied.  Can't save or open the file.  Also don't have permission

    I am going insane. When FTP'ing files from Dreamweaver to our hosting server, it sends the file but from that point on, if I attempt to open or save the file, I get this error message: quote: Access to C:\Users\admin\Desktop\listcombo\Stylevantage1-0