core: handle encoding in start_command()

Signed-off-by: David Aguilar <davvid@gmail.com>