cross-platform encoding support