Skip to content

backslash ('\\') in string value in toml file throws Invalid escape character error #1

askesian opened this Issue Feb 25, 2013 · 3 comments

2 participants


I have a toml file in which I am storing file paths, like this:

base_path = "\some\base\path"

When I have the path formatted like that, I get an Invalid Escape Character error thrown from the EscapedChars class. The character that throws the error is the 's' in '\some\base\path'. I've tried '\' instead of '\', as well as other variations, but the only thing that works is if the path delimiter is '/'. I am referencing a file system path, not a web URL, so '/' isn't appropriate.


If you use a double backslash (i.e. an escaped backslash), as you would in c or c++ or c#, does it still fail?
ex: \some\base\path


hmmm, my double backslash was stripped out when I hit the 'comment' button.


This should be fixed w/ commit 712f771

@LBreedlove LBreedlove closed this Feb 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.