I am storing some short user data strings in the Windows registry. This worked fine until one of my users tried to store a string containing a '\' character. This was then interpreted as a registry path delimiter.
What is the best practice for avoiding this problem? Some sort of simple encoding?
Note/ I am using the Qt QSetting class to access the registry via C++, so I would appreciate an answer that is generic, rather than specific to any particular MS tool/language.