Is there a “glyph not found” character?
From the Unicode Spec: http://unicode.org/charts/PDF/U25A0.pdf U+25A1 □ WHITE SQUARE may be used to represent a missing ideograph → U+20DE $⃞ combining enclosing square
From the Unicode Spec: http://unicode.org/charts/PDF/U25A0.pdf U+25A1 □ WHITE SQUARE may be used to represent a missing ideograph → U+20DE $⃞ combining enclosing square
The @ sign in filenames in Subversion actually has a special meaning – a pegged revision number. To quote the Subversion book: The perceptive reader is probably wondering at this point whether the peg revision syntax causes problems for working copy paths or URLs that actually have at signs in them. After all, how does … Read more
NSCharacterSet * set = [[NSCharacterSet alphanumericCharacterSet] invertedSet]; if ([aString rangeOfCharacterFromSet:set].location != NSNotFound) { NSLog(@”This string contains illegal characters”); } You could also use a regex (this syntax is from RegexKitLite: http://regexkit.sourceforge.net ): if ([aString isMatchedByRegex:@”[^a-zA-Z0-9]”]) { NSLog(@”This string contains illegal characters”); }
For some reason, the above answer didn’t work for me. For those like me who come after, here is what I found. I was expecting a single backslash to escape the bracket, however, you must use two if you have the pattern stored in a string. The first backslash escapes the second one into the … Read more
Don’t HTML-encode your characters before storage. You should store as pure a form of your data as possible. HTML encoding is needed because you are going to display the data on an HTML page, so do the encoding during the processing of the data to create the page. For example, suppose you decide you’re also … Read more
string s = “123\t456\t789”; string[] split = s.Split(‘\t’);
#’functionname in Common Lisp Common Lisp and some other Lisp dialects have more than one namespace. Here the ones for functions and values are different. To get the function value of a name, we need to write: (function functionname) Since that is a bit long to write, there is a shorter notation: #’functionname To show … Read more
If you really want to check for all those special characters, it’s easier to use a regular expression: var str = $(‘#Search’).val(); if(/^[a-zA-Z0-9- ]*$/.test(str) == false) { alert(‘Your search string contains illegal characters.’); } The above will only allow strings consisting entirely of characters on the ranges a-z, A-Z, 0-9, plus the hyphen an space … Read more