]]>By: Michael TidmarshMichael Tidmarshhttp://itknowledgeexchange.techtarget.com/itke-community-blog/?p=3477#comment-4762013-02-11T15:38:31Z2013-02-11T15:38:31ZCongratulations Tom, you have won the book! Watch out for an email from me so I can sent it to you.
]]>By: TomLiottaTomLiottahttp://itknowledgeexchange.techtarget.com/itke-community-blog/?p=3477#comment-4732013-01-29T00:46:59Z2013-01-29T00:46:59ZWhen attempting to use Google GWT/GXT in my last project, I had to handle backslashes in a property (stored in a properties file). This was a property value entered by customers, and a backslash was a valid character. (That ought to be all I need to say to explain the problem to anyone who has had to do the same thing for the first time.)
Over and over I tried various methods of accepting, then storing, then retrieving the blasted “property” while retaining the backslash, all the while cursing the original developers who thought that storing this value as a “property” was a good idea. Over and over, the backslash would disappear at some point in the series of operations. Sometimes it would also cause the following character to disappear, as should be expected when the backslash acted in it’s normal ‘escape’ mode for that character.
The number of web searches I had to make and of alternative routines I had to code before finally coming up with a concise, clean code sequence that some future developer could grasp is more than I can remember. Those included multiple discussions with all members of the original team, none of whom had any suggestions on how to make it work.