Attempted fix for issue #56 (non-UTF8 locales).