escaping line breaks in string

Short of writing my own method to do this, is there something built into Xojo that will meet the following specification (the filepath they refer to will be a native path as a string at the point where I’m manipulating it):

[quote] o If a filepath includes a Line Feed (LF), a Carriage Return (CR),
a Carriage-Return Line Feed (CRLF), or a percent sign (%), those
characters (and only those) MUST be percent-encoded following
[RFC3986].[/quote]

EncodeURLComponent does this, but it also escapes spaces and everything else, which is not what I’m supposed to do here. I’m hoping there’s something built-in before I write some custom code to do this, but I can’t find anything that lets me specify specific characters to escape.

I’m on Xojo 2017r3

Thanks!

double posting a question doesn’t produce more or better answers

the server was screwed up and kept telling me to retry

[quote=458448:@Perry Paolantonio]Short of writing my own method to do this, is there something built into Xojo that will meet the following specification (the filepath they refer to will be a native path as a string at the point where I’m manipulating it):

EncodeURLComponent does this, but it also escapes spaces and everything else, which is not what I’m supposed to do here. I’m hoping there’s something built-in before I write some custom code to do this, but I can’t find anything that lets me specify specific characters to escape.

I’m on Xojo 2017r3

Thanks![/quote]

It should be pretty easy to do with ReplaceAll.