I have a mysql database that has text stored in it with non encoded special characters.
Example, there is are cells in a table that has text like Texas A&M
I want all of the text in my database to have it’s appropriate ascii form.
Example, Texas A&M should be Texas A&M.
It is a large database and I want to make sure all characters in this ASCII chart are accounted for and converted.
What is a good way to do this?
You say you want to make sure all characters in “this ASCII chart”, but the charts there include all printable characters, so I don’t think you actually want to do what you are saying. Instead, you probably want to encode for XML, URL or HTML.
The simplest way is to load the data into whatever XML processing tool you have and let it do the work. That said, I find that 99% of the time when people are storing “pre-encoded” data they aren’t actually wanting that: they want to encode the data for some output. It is far better to store data in its native form and then encode on use/output.
The reason is simple: ever seen an application where the window titles look like
"Installing X&Y Application"? It is because the data was perceived as “only being used for web output” and pre-encoded. But even then, web output is different in the HTML, URL and XML exchange contexts, so pre-encoded data really boxes you into one of these choices, rather than doing the right encoding at output time.If you actually want to do this though, you need to provide more details as to the environment you are using (actual database type and programming languages available).