Handle unknown encodings without crashing
Improved snippet extraction, preparing for "rich snippets" (issue #276)