There is such code:
for (User user : userList) { String oneLine = user.getDepName(); bw.write(oneLine); bw.newLine(); } As a result Офис "Центральный" is stored in the oneLine line. How can you replace everything " with "" , so that the Офис ""Центральный"" user.getDepName().replaceAll("\"","\"\""); did not help?
replaceAllreturns a new string, but does not change the current one. Perhaps the problem is this. - Pavel Parshinuser.setDepName(user.getDepName().replaceAll("\"", "\"\"")) ;- Senior Pomidor