By design pikestrings are _always_ handles as unicode by all functions that does not use them as simple data (such as read/write etc).
Hence, all data in pike programs should be unicode except for at the interface between the system (file and socket I/O).
Thus, if you have a utf8-string read from a file or the network, convert it to unicode before passing it to any pike functions expecting strings.