Codex Function Problems When There is an Apostrophe in the Category Name

You can use this. May it will help you.

ent2ncr

Converts named entities into numbered entities.