Character recognition method and apparatus for handwrite and printer