Surround some encoding-specific functions with the appropriate