illegal-characters

System.ArgumentException illegal characters in path

I am using Path.Combine, and one of the strings contain a Unicode characters. I get {System.ArgumentException} exception; illegal characters in path. According to MSDN filepath/name can have unicode characters. Why do I get this exception? Edit: Here is the code: Path.Combine("C:\PDM\Silver","Amabel Bender QQQ") ...

What are all the illegal characters in the XFS filesystem?

Could someone provide (or point me to a list) of all the illegal characters in the XFS filesystem? I'm writing an app that needs to sanitize filenames. EDIT: Okay, so POSIX filesystems should allow all characters except the NUL character, forward slash, and the '.' and '..' filenames are reserved. All other exceptions are application-l...

Invalid Characters in XML

Hey all, I am working with some XML at the moment. I have nodes that hold strings like below: <node>This is a string</node> Some of the strings that I am passing to the nodes will have characters like &, #, $ etc. <node>This is a string & so is this</node> This is not valid due to the & I cannot wrap these strings in CDATA as th...

Firefox and magically appearing character (Â) when unescaping an ®

I'm unescaping an ® (registration character) in firefox to be submitted in a form, since actually typing that character into Javascript causes the script to behave strangely. However, I must use the unescaped(..) version of the character since it is being submitted to the backend (where I have no control) and the output is a pdf file wh...

Will URLEncode fix this problem with illegal characters in file names (C#)?

I'm building an application that uses an elaborate API to fetch data from Youtube, and the data files are saved with the name of the corresponding video as the file name. However, my program is crashing because quite a lot of the videos on YouTube have characters in their titles that are illegal to use in file names under Windows. Would...

illegal character, Javascript

I am trying to run jquery through a rails app. I have the edit information in a popup window and i want to change that to show information after they click update. It should work but this line $(".edit_business).append("<%= escape_javascript(render(:file => 'businesses/show')) %>"); is throwing an illegal character issue. This code i...

Best way to find illegal characters in a bunch of ISO-889-1 web pages?

I have a bunch of html files in a site that were created in the year 2000 and have been maintained to this day. We've recently began an effort to replace illegal characters with their html entities. Going page to page looking for copyright symbols and trademark tags seems like quite a chore. Do any of you know of an app that will take a ...

Remove & character from string objective c

Hey, How would I go about removing the "&" symbol from a string. It's making my xml parser fail. I have tried [currentParsedCharacterData setString: [currentParsedCharacterData stringByReplacingOccurrencesOfString:@"&" withString:@"and"]]; But it seems to have no effect ...

.Net: How do I check for illegal characters in a path?

Is there a way to check if a String meant for a path has invalid characters, in .Net? I know I could iterate over each character in Path.InvalidPathChars to see if my String contained one, but I'd prefer a simple, perhaps more formal, solution. Is there one? I've found I still get an exception if I only check against Get Update: I've...

VB.NET Debug Error

I get this error "Illegal characters in path" for this code: Dim strm As System.IO.FileStream strm = New System.IO.FileStream(filepath, IO.FileMode.Open, IO.FileAccess.Read) ...

Illegal Character in File Name

Hi, During my file upload process, I found illegal character getting saved in Table. zurück.pdf, C _Word.doc were the file names. Here ü, space between C and _Word was found as ? in the Table Column. I have validate the filename in client side by replacing non-alpha numeric values by _ (underscore), but still it escapes and persist into...

In PHP when submitting strings to the DB should I take care of illegal characters using htmlspecialchars() or use regex?

I am working on a form with the possiblity for the user to use illegal/special characters in the string that is to be submitted to the database. I want to escape/negate these characters in the string and have been using htmlspecialchars(). However, I would like to know if there is a better/faster method. ...

Django: How can I determine why Django isn't displaying certain data?

I have a Django app that runs a tool and displays the results from the tool back to the user using a Django template. Sometimes Django does not display the results. It doesn't complain about anything, it just doesn't display the results. I'm guessing this is something to do with one or more of the characters in the results being illegal ...

illegal character in jsonp response

Hi i am doing an exercise where I am trying to scrape content of nytimes website using javascript/ajax. In order to send cross domain ajax request I am using a proxy server that returns me jsonp response with nytimes website content. But since that html content has some charaters (single quotes) which throws "Illegal Character" error. ...

Android: Parsing URL into web service without space character

Hi, All I want to do is to send a URL String into my RESTFUL web service with some kind of code like this URL someURL= new URL("http://myWebService:port/service/"+CharSequence.getText()); Its all going well until I found error with space character in my URL. I found some solution about replacing the space character with %20 which is I...

Helper for removing illegal characters?

I am using a user input string to create a url and I only want the url to contain lowercase letters and hyphens e.g. example.com/this-is-a-url In my model, I have added so far: def to_param name.downcase.gsub(" ", "-") end This makes it lowercase and hyphenated. How can I remove all illegal characters, such as '/"$£%& ...

How to prevent illegal characters to appear in my XML when retrieving it from SQL Server

Sometimes the string values of Properties in my Classes become odd. They contain illegal characters and are displayed like this (with boxes): 123[]45[]6789 I'm assuming those are illegal/unrecognized characters. I serialize all my objects to XML and then upload them via Web Service. When I retrieve them again, some characters are re...

Valid characters for URI schemes?

I was thinking about Registering an Application to a URL Protocol and I'd like to know, what characters are allowed in a scheme? Some examples: h323 (has numbers) h323:[<user>@]<host>[:<port>][;<parameters>] z39.50r (has a . as well) z39.50r://<host>[:<port>]/<database>?<docid>[;esn=<elementset>][;rs=<recordsyntax>] paparazzi:ht...

ASP.NET MVC - Illegal characters in path - redirect from Application_Error

In my application I generated few url which contained " (double quotes), unfortunately. I corrected the url's but google bot already indexed wrong urls. Now I get quite often following exception: System.ArgumentException: Illegal characters in path. The only one place I can catch the error is the Application_Error in the Global.asax - ...

How to detect illegal UTF-8 byte sequences to replace them in java inputstream?

Hi! The file in question is not under my control. Most byte sequences are valid UTF-8, it is not ISO-8859-1 (or an other encoding). I want to do my best do extract as much information as possible. The file contains a few illegal byte sequences, those should be replaces with the replacement character. It's not an easy task, it think it...