[San-Diego-pm] Cold shower in UTF-8

Brian Manning elspicyjack at gmail.com
Fri Oct 25 19:19:46 PDT 2013

On Fri, Oct 25, 2013 at 4:22 PM, Joel Fentin <joel at fentin.com> wrote:
> I did some web sites long ago. Their owner moved them to Network Solutions.
> Network Solutions suddenly and without prior notice changed the MySQL
> character encoding to UTF-8. There are fields in the database which are
> displayed on webpages. I have some cleanup to do.
> Is there an industry standard for putting CR &/or LF into such a database
> text field? Or does everyone roll his own?

A SQL UPDATE using the output of a SELECT * from your existing tables
should work I should think.

You may also be able to drop then recreate the tables using the same
encoding you used before.  That would be up to NetSol.

> Are there an industry standards for áéíñóúÁÉÍÑÓÚ¡¿

Yes, they're called ISO standards and/or Unicode standards, depending
on what the encoding of your existing text is.  You could use 'iconv'
or 'enca/enconv' to detect and/or convert between your source
encodings to UTF-8.  You could also use *cough*PERL*cough*, but it's
probably easier/quicker/faster to use existing tools built for this
purpose than to roll your own in *cough*PERL*cough*.



More information about the San-Diego-pm mailing list