NSStringEncoding Considered Harmful

from blog The Desolation of Blog, | ↗ original
It appears that [[NSString alloc] initWithData:data encoding:NSASCIIStringEncoding] never returns nil. I learned of this from Cédric Luthi. For instance, the following code unexpectedly returns an NSString with the copyright © symbol, which is non-ASCII: