add netbsd-specific platform encoding functions with support for ASCII, Latin-1, and UTF-8 locales