/*
ReadBig5File.java
read a file in big5 code
> javac ReadBig5File.java
> java ReadBig5File big5.txt
Big5編碼文字檔
*/
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.BufferedReader;
public class ReadBig5File
{
public static void main(String args[]) throws
java.io.FileNotFoundException,
java.io.UnsupportedEncodingException,
java.io.IOException
{
String file="big5.txt";
FileInputStream fis = new FileInputStream(new File(file));
// java.io.FileNotFoundException
BufferedReader br =new BufferedReader(new InputStreamReader(fis,"BIG5"));
// java.io.UnsupportedEncodingException
// java.io.IOException
while(br.ready())
{
String line=br.readLine();
System.out.println(line);
System.out.flush();
}
br.close();
}
}
how to read big5 files in Java
訂閱:
張貼留言 (Atom)
how to connect codex app to remote ollama backend through caddy relay
如何讓 Codex App 連接公司架設的 LLM 從 Caddy 閘道安裝、遠端 Ollama API 金鑰,到 Codex 的 config.toml 組態設定,一次整理成可直接照做的流程。 前言 OpenAI 提供免費下載...
沒有留言:
張貼留言