Decode the string to UTF8, always user/dyrcona/lp888572
authorDan Scott <dscott@laurentian.ca>
Sun, 4 Mar 2012 08:00:49 +0000 (03:00 -0500)
committerJason Stephenson <jstephenson@mvlc.org>
Wed, 7 Mar 2012 20:57:54 +0000 (15:57 -0500)
commite02f0723fb65d76194a5b9ccf5f5b055b3e3c835
tree5951f19ca533af54c69287921ed80c3319198631
parenta278aba2c4bbcb6aeaeac0c6af6d851fd8ad6d76
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>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Open-ILS/src/perlmods/lib/OpenILS/Utils/Normalize.pm