Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Extracting Japanese(kana) Charecters from a file

mou haj
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can anybody help me??
I have a csv file or a fixed length txt file from where I'll have to capture some Kana Information and store them in a Database and also display them on a browser Im trying with this code but cant do it its displaying some junk
import javax.servlet.*;
import javax.servlet.http.*;
import* ;
import java.lang.*;
import java.util.*;
public class showFile3 extends HttpServlet
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
}//end of doGet
public void init(ServletConfig config) throws ServletException
}//end of init
public void doPost (
HttpServletRequest request,
HttpServletResponse response
) throws ServletException, IOException
PrintWriter out = new ());
int i;
String str;
String encodingType = "JISAutoDetect";
RandomAccessFile jpTextFile = new RandomAccessFile("d:\\filehandling\\kana.txt", "r");
byte[] fileBytes = new byte[20] ;
String fileString = null;, 0, 15) ;
fileString = new String(fileBytes, encodingType);
out.println(" <META HTTP-EQUIV='Content-Type' Content='text/html; charset=x-sjis'></head><body>");
catch (Exception e)
System.err.println("File input error");
}//post ends
}//class ends
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic