Design of an Offline Handwriting Recognition System Tested on the Bangla and Korean Scripts