Converting “Bizarre” Chars in String to Roman Chars

跟風遠走 提交于 2019-12-04 16:40:06

If I were you, I'd create a Dictionary which would contain the mappings from foreign letters to Roman letters. I'd use this for two reasons:

  1. It will make understanding what you want to do easier to someone who is reading your code.
  2. There are a small, finite, number of these special letters so you don't need to worry about maintenance of the data structure.

I'd put the mappings into an xml file then load them into the data structure at run-time. That way, you do not need to modify any code which uses the characters, you only need to specify the mappings themselves.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!