P
P
pthon2019-12-28 22:30:48
Java
pthon, 2019-12-28 22:30:48

How to put the right encoding?

Hello! here is the code:

if (Com.equals("")) {

                    } else {
                        Runtime runtime = Runtime.getRuntime();
                        Process proc = runtime.exec(Com);
                        InputStream process = proc.getInputStream();
                        BufferedInputStream buf = new BufferedInputStream(process);
                        int i;

                        String str = "";

                        while((i = buf.read())!= -1){

                            //System.out.print((char)i);

                            str = str + (char)i;
                            str = str.replace("\\", "/");
                            str = str.replace("<", "");
                            str = str.replace(">", "");
                        }

Cyrillic is displayed incorrectly, how to fix it?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question