Fix unicode exception when snippets contain unicode

This is a bug introduced by the source snippets feature.

@brianhw