]> git.evergreen-ils.org Git - working/Evergreen.git/commit
Decode the string to UTF8, always
authorDan Scott <dscott@laurentian.ca>
Sun, 4 Mar 2012 08:00:49 +0000 (03:00 -0500)
committerDan Scott <dscott@laurentian.ca>
Wed, 7 Mar 2012 21:03:13 +0000 (16:03 -0500)
commitc694929e4ba58ecf13e5903624ec6c784c37f439
tree5951f19ca533af54c69287921ed80c3319198631
parent2788298ec23d1caff3755f9c151d03510420651d
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