Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/file/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从希伯来文文本文件java 8中读取_Java_File_Io_Hebrew - Fatal编程技术网

从希伯来文文本文件java 8中读取

从希伯来文文本文件java 8中读取,java,file,io,hebrew,Java,File,Io,Hebrew,我想读希伯来文的文本文件,但我得到了一些杰布里什 这是我的代码: try { workFile =new File("tripShosWork.txt"); homeFile =new File("tripShosHome.txt"); BufferedReader homeBr = new BufferedReader(new FileReader(homeFile)); BufferedReader workBr = new

我想读希伯来文的文本文件,但我得到了一些杰布里什

这是我的代码:

try {
        workFile =new File("tripShosWork.txt");
        homeFile =new File("tripShosHome.txt");
        BufferedReader homeBr =  new BufferedReader(new FileReader(homeFile));
        BufferedReader workBr = new BufferedReader(new FileReader(workFile));
        home = new String [98];
        for (int i = 0; i < home.length; i++) 
            home[i] = homeBr.readLine();
        work = new String [19];
        for (int i = 0; i < work.length; i++) {
            work[i] = workBr.readLine(); 
        }
    } catch (Exception e) {
        e.printStackTrace();
    } 
    System.out.println(Arrays.toString(work));
    System.out.println(Arrays.toString(home));
试试看{
工作文件=新文件(“tripShosWork.txt”);
homeFile=新文件(“tripShosHome.txt”);
BufferedReader homeBr=新的BufferedReader(新文件读取器(homeFile));
BufferedReader workBr=新BufferedReader(新文件读取器(工作文件));
home=新字符串[98];
for(int i=0;i

我需要你的帮助

您可以这样做:

FileInputStream fis = new FileInputStream("tripShosWork.txt");
InputStreamReader in = new InputStreamReader(fis, "Cp1255");

这假定文件采用Windows希伯来语编码。对拉丁语-8使用
“ISO8859_8”

您可以这样做:

FileInputStream fis = new FileInputStream("tripShosWork.txt");
InputStreamReader in = new InputStreamReader(fis, "Cp1255");

这假定文件采用Windows希伯来语编码。拉丁语-8使用
“ISO8859_8”

文件的编码是什么?CP862?UTF8?UTF16?UTF32?文件的编码是什么?CP862?UTF8?UTF16?UTF32?