Could you save the string then read it just after saving and compare both strings? If they are the same then problem is not DB part.
I would check editor kit of the destination JtextPane. It must be the same as in the source JTextPane. If strings are different then it's DB problem.
Look at the http://www.java2s.com/Code/Java/Database-SQL-JDBC/Saveimagetoderbydatabase.htm example. You can store your text (bytes of the string) rather than image.