zendframework/zf2 — pull request #762 by pajousek (2012-01-31 11:17:31+00:00)
Title: Default $encoding set to UTF-8 in \Zend\Search\Lucene\Document\Field

There's one problem with having $encoding set to default "" (empty string), because there's a lot of texts that AREN'T in standard 7bit ASCII.

And then iconv() fails with notice (if you're using some debugger that has strict mode to report every notice) about illegal character, because $in_charset was = "";

So there are IMHO two options howto avoid these needless notices when using Field factories.
a) Make $encoding a mandatory parameter (which would cause a BC break)
b) Make $encoding have some fallback value, like UTF-8 (which is widely used anyways) -- will be better for new users and won't BC break old ones, because they're already using some set encoding or having it empty, which is 7bit ASCII (compatible with UTF-8 on their strings).

I chose b).