Jena - 한글

software 2007. 8. 20. 11:26

An Introduction to RDF and the Jena RDF API 을 따라 하던중 한글 테스트 결과
...
public class Tutorial06 extends Object {
...
// use the FileManager to find the input file
InputStream in = FileManager.get().open(inputFileName);
 if (in == null) {
       throw new IllegalArgumentException( "File: " + inputFileName + " not found");
 }
           
// read the RDF/XML file
//model.read(new InputStreamReader(in), "");  // 한글 - uft8 저장시 깨짐. ANSI 저장시 정상출력
//model.read(in, "");                                         // 한글 - uft8 저장시 정상. ANSI 저장시 에러
model.read(new InputStreamReader(in,"utf-8"), ""); //한글 - 원본파일 저장형식에 관계없이 정상
...

별문제 없이 지나갈수 있을까..쩝
Posted by ukmie
,