Originally posted by Bill Cruise:
The function removes the "f" and "," characters because you're telling it to. The first argument to the String replaceAll method is a regular expression. You have commas separating ranges of characters, so the comma is removed. You also have "\\xffff" at the end of the regular expression, so the f is removed. That should be "\\xff", the last two characters are just interpreted as "f". You can fix this by removing the commas and the last two "f"s from the second call to replaceAll.