pub fn encode_path(raw: &str) -> String
Percent-encode characters in a path segment that would cause URL parsing issues
Preserves / as path separators; encodes ?, #, %, spaces, and control chars
/
?
#
%