View Full Version : Help me! SOS
Trong Oracle Form.
Tôi cần mở 1 file dạng *.txt nhưng lưu dạng UTF8 hoặc Unicode thi phải làm thế nào?
Không hiểu í bạn là sao?
Mở file txt bằng Oracle forms hay là viết chương trình mở file txt trong oracle forms??
Tôi muốn đọc từ CSDL Oracle ra file dạng txt các trường Varchar2, number .
Trong CSDL la UTF8.
Nhưng lưu ra file *.txt chỉ được dạng ANSI.
Làm thế nào để lưu được dưới dạng UTF8
nganminh
28-08-2004, 03:47
// encode co the nhan cac gia tri:
// UTF8, windows-1252,...
try {
FileOutputStream fos = new FileOutputStream(toFile);
OutputStreamWriter osw = new OutputStreamWriter(fos, encode);
PrintWriter pw = new PrintWriter(osw);
pw.println(sContent);
pw.close();
System.out.println("Filename: " + toFile);
}
catch (IOException ioe) {
System.err.println(ioe);
}
Thử đoạn code trên xem sao nhé.
Lưu ý là đoạn code trên viết bằng Java đấy!!!
Chúc vui
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.