C# Sanitize File Name

I recently have been moving a bunch of MP3s from various locations into a repository. I had been constructing the new file names using the ID3 tags (thanks, TagLib-Sharp!), and I noticed that I was getting a System.NotSupportedException: “The given path’s format is not supported.” This was generated by either File.Copy() or Directory.CreateDirectory(). It didn’t … Read more

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

I noticed that in Internet Explorer (but, unfortunately, not in the other browsers I tested), you can use some Unicode variable names. This made my day, and I was absolutely delighted that I could write fun Unicode-laden code like this: var ктоείναι草泥马 = “You dirty horse.”, happy☺n☺mat☺p☺eia = “:)Yay!”, ಠ_ಠ = “emoticon”; alert(ктоείναι草泥马 + happy☺n☺mat☺p☺eia … Read more