I am trying to calculate the number of code points that are present in a file, but it always showing me the number of characters being used.
I am using string buffer to read the file, so I come to this part f d code
while ((sCurrentLine = br.readLine()) != null) {
System.out.println(sCurrentLine);
numChar=numChar+sCurrentLine.length();//Calculating number of characters on each line
numCdpoints=numCdpoints+sCurrentLine.codePointCount(0,sCurrentLine.length());//Calculating the number of code points
}
If there is anything anyone can suggest, it would be really helpful