So in my game, the user sets their name in a text field that I use preferences to store.
When I relaunch the application, I got an error.
When I went to the prefs file that was made in .prefs it had a bunch of HTML escape sequences, specifically � right before a sequence of captials.
How do I stop these?
That is probably from unicode characters that your text file viewer does not know how to display. If you don’t want to support all of unicode in your usernames then you should check if they are the only made up of the characters you like with a regex before saving to the property file:
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
Or
convert to a different character set:
http://docs.oracle.com/javase/7/docs/api/java/nio/charset/CharsetEncoder.html
http://docs.oracle.com/javase/7/docs/api/java/nio/charset/Charset.html
or you can let your users use any unicode characters and try to figure out the root cause of the exception. Though there are some weird unicode chars that could lead to some confusion. Post the exception if you want.