Тема: проблеми з кирилицею
Написав сервлет, працює гуд та виникло питання з кодуванням....
Мені приходить xml наприклад:
<?xml version="1.0" encoding="UTF-8"?><name>Ostap</name><surname>Пупкін</surname>
роблю:
protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
String requestXml = getRequestXml(request.getInputStream(),request.getContentLength());
}
public static String getRequestXml(ServletInputStream servletInputStream, int contentLength) throws IOException {
        BufferedInputStream bs = new BufferedInputStream(servletInputStream);
        int formDataLength = contentLength;
        byte dataBytes[] = new byte[formDataLength];
        int byteRead = 0;
        int totalBytesRead = 0;
        while (totalBytesRead < formDataLength) {
            byteRead = bs.read(dataBytes, totalBytesRead, formDataLength);
            totalBytesRead += byteRead;
        }
System.out.println(new String(dataBytes,"UTF-8"));    
    
        return new String(dataBytes,"UTF-8");
                }і працюю далі але в SystemOut     O 
<?xml version="1.0" encoding="UTF-8"?><name>Ostap</name><surname>Пупкін</surname>як, не використовуючи .replaceAll("П", "П").... з цим поборотись?
0xDADA11C7: Використовуйте теґ code