Fixed bug #153937, making sure the conversion functions return the number

* encoding.c doc/examples/testWriter.c: Fixed bug #153937, making
  sure the conversion functions return the number of byte written.
  Had to fix one of the examples.
Daniel
4 files changed