Ah, i'm silly. This is a much cleaner implementation of my previous initdb encoding patch.
Just discard the previous.
Chris