encoding text for notes