add encoding example to docs