in reply to Convert strings with unknown encodings to html

Lots of people have this problem, they put junk in the database, and then hope they can get it all back correctly , wishful thinking

Encoding::FixLatin, Re: Can Perl convert ISO-? | WIN-? | MAC-? to UTF-8?.....

  • Comment on Re: Convert strings with unknown encodings to html (fix your database)

Replies are listed 'Best First'.
Re^2: Convert strings with unknown encodings to html (fix your database)
by Pascal666 (Scribe) on Jun 30, 2015 at 19:22 UTC

    Encoding::FixLatin does appear to be what I was looking for. I replaced the two noted lines with:

    $in[$_] = fix_latin($in[$_]) for 0..9;

    and everything converted correctly. I integrated this fix into my main program and again everything seems to be converting correctly.

    Thank you for your assistance.

      Great,

      next step should be to track down all the programs that are putting junk inside the database, fix them to put in the correct stuff

      then backup database, and go ahead and fix_latin the whole database, so fix_latin is no longer needed in your display program

      then your database will just have correct data