Valid characters in a Java class name

You can have almost any character, including most Unicode characters! The exact definition is in the Java Language Specification under section 3.8: Identifiers. An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter. … Letters and digits may be drawn from the entire Unicode … Read more

C# Sanitize File Name

To clean up a file name you could do this private static string MakeValidFileName( string name ) { string invalidChars = System.Text.RegularExpressions.Regex.Escape( new string( System.IO.Path.GetInvalidFileNameChars() ) ); string invalidRegStr = string.Format( @”([{0}]*\.+$)|([{0}]+)”, invalidChars ); return System.Text.RegularExpressions.Regex.Replace( name, invalidRegStr, “_” ); }

Why aren’t ◎ܫ◎ and ☺ valid JavaScript variable names?

ಠ_ಠ and 草泥马 only contain “letters” used in actual alphabets; that is, ಠ is a symbol from the Kannada alphabet, and 草泥马 consists of Chinese characters. ◎ and ☺, however, are purely symbols; they are not associated with any alphabet. The ECMAScript standard, chapter 7.6 (which all the browsers except Internet Explorer are following), states … Read more

tech