added registry utils and utf-8/utf16 utility functions