How can I, reasonably, tell if a string contains text—ISO Latin-1, but preferably Unicode—or arbitrary binary data (like a JPEG image).
In reply to How can I tell if a string contains binary data or plain-old text? by Anonymous Monk