views:

80

answers:

1

I've got a database where for efficiency, i've put the data into the db in html encoded formats.

I do maintenance on the data, and then move it into production via an 'into outfile', so it ends up in a text file.

The special characters don't make it across cleanly, and it comes out as all messed up code.

Is there a way to maintain the format for the txt file? Or should I be using another format?

The 'outfile' , and 'import'I find very efficient for doing a bulk transfer.

If i can't use that, any suggestions on the best way to find special characters in mysql? The only thing I've found seems to find fields that ONLY contain non-ascii characters

SELECT * FROM tableName WHERE NOT columnToCheck REGEXP '[A-Za-z0-9]';
+1  A: 

Is there a reason you're storing HTML encoded text in the database? As discussed in episode 58 of the Stack Overflow podcast, you should always try to store raw data at the highest level of precision possible.

Evan Meagher
Not much for podcasts, so I missed that. I searched a bunch on the web before, and the consensus seemed to be that if it was going to be returned in html encoding, why not store it as such. I may have been looking in the wrong places. I'm happy to change it, but can't seem to pull out the issue rows.
pedalpete