1. A non-transitory computer-readable storage medium storing therein a recognition program that causes a computer to execute a process comprising: recognizing a plurality of characters from handwritten characters in input handwritten data; setting reference positions of a specific handwritten character and an adjacent handwritten character included in the handwritten characters based on recognition results of the recognized characters, the specific handwritten character and the adjacent handwritten character corresponding to a specific character and an adjacent character included in the recognized characters, respectively, the adjacent character being located adjacent to the specific character; determining whether a space is present between the specific character and the adjacent character based on the reference positions; and generating space information indicating a result of the determining.