tamil character segmentation using java

Asked by surya

In the below coding i tries to read the lines with specific length and writes on another notepad.this coding works well for english characters. but for tamil letters if i tries to count ...it count as:

(e.g)தமிழ்

it counts as 5..(i.e)"த", "ம", "ி", "ழ" and "்".
but i want to count it as 3(i.e)"த", "மி" and "ழ்"

PS: It is a tamil language

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;

public class ii {

public static void main(String[] args) {
    FileReader fr = null;
    BufferedReader br =null;
    FileWriter fw=null;
    BufferedWriter bw=null;

    String [] stringArray;
    int counLine = 0;
    int arrayLength ;
 String s="";
   String stringLine="";

   try{
        fr = new FileReader("F:\\New folder (2)\\N.txt");
        fw=new FileWriter("F:\\New folder (2)\\o.txt");
        br = new BufferedReader(fr);
        bw=new BufferedWriter(fw);
      while((s = br.readLine()) != null){
            stringLine = stringLine + s;
            stringLine = stringLine + " ";
            counLine ++;
        }
        stringArray = stringLine.split(" ");
        arrayLength = stringArray.length;
    for (int i = 0; i < arrayLength; i++) {
            int c = 1 ;
            for (int j = i+1; j < arrayLength; j++) {
                if(stringArray[i].equalsIgnoreCase(stringArray[j])){
                   c++;
                   for (int j2 = j; j2 < arrayLength; j2++)
                      {
                       }}
             int k;
              for(k=2;k==stringArray[i].length();i++)
              {
              bw.write(stringArray[i]);
               bw.newLine();

              }}} fr.close();
        br.close();
        bw.flush();
            bw.close();
    }catch (Exception e) {
        e.printStackTrace();
    }}}

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

not a question for this forum.
try on stackoverflow

Can you help with this problem?

Provide an answer of your own, or ask surya for more information if necessary.

To post a message you must log in.