Update MetaGenerator.php

Used mb_substr and mb_strlen for working with another encodinds like Russian