Decode the string to UTF8, always user/dbs/LP888572_clean_marc_fix_corruption
authorDan Scott <dscott@laurentian.ca>
Sun, 4 Mar 2012 08:00:49 +0000 (03:00 -0500)
committerDan Scott <dscott@laurentian.ca>
Sun, 4 Mar 2012 08:00:49 +0000 (03:00 -0500)
commit451745dfeaccc3bfe870c88d28cf5268781349f0
tree11a3efa03b435e7b6ed9ba34b4f486cabec30706
parentd258b7847591f9344765909d1e737d59cb5686cf
Decode the string to UTF8, always

Even if you know that the caller is passing you a decoded UTF8 string,
you can and should decode it yourself, because some day a caller isn't
going to decode it first and you're going to wind up in misery trying to
figure out why you're broken.

In this case, it resolves the mystery of why the unit tests failed when
Vandelay seemed to be ticking along fine. As the comment in clean_marc()
mentioned, "assume input is already in UTF8" - but as soon as it isn't,
boom.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/src/perlmods/lib/OpenILS/Utils/Normalize.pm