I actually wrote a service attempting to deal with this exact problem, the amount of edge cases and exceptions make it particularly challenging, nearing that of general NLP.
Probably my favorite case were some Manchurian names, which could only be spelled vertically.