corrected the write special characters in database