Fix invalid byte sequence errors when using grep method

When using code search, errors are throw of Invalid byte sequence

This fixes that by converting the encoding correctly to UTF8