Search code examples
pythonunicodecharacter-encodingcharacterspecial-characters

Strange characters which are similar with familiar characters


While looking into some data, I tend to find characters like

’‘♯"“”&,

These are similar with but not exactly the same as,

''#"""&,

respectively, which are familiar characters which can be found on keyboard.

What are those special characters ’‘♯"“”&?

I guess there are much more characters like these. Could you provide me the entire list of such special characters?

Also, how can I easily replace these with more familiar characters? Would python do it?


Solution

  • Those look to be unicode characters. Luckily it is easy to replace them.

    To replace the small number sign, which is unicode character FEF5, you'd simply do this:

    str.replace(u"\uFEF5", "#")
    

    For a full list of unicode characters: Unicode page/search