java 中取出unicode字符串中的不可见字符


my_string.replaceAll("\\p{C}", "?");
        BufferedReader reader = new BufferedReader(new FileReader(
                "D:\\test\\1.txt"));
        String stopWord = null;
        while ((stopWord = reader.readLine()) != null) {
            stopWord=stopWord.replaceAll("\\p{C}", "");
            System.out.println(stopWord);
            char[] test = stopWord.toCharArray();
            for (char c : test) {
                System.out.println(c);
                
            }
        }

http://stackoverflow.com/questions/6198986/how-can-i-replace-non-printable-unicode-characters-in-java


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM