utf-8转码为ascii

utf-8转码为ascii windows下是调用api

To Read a file encoded with UTF-8, use a BufferedReader:

    BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8"));

    To Write a file encoded with UTF-8 use a BufferedWriter:

BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), "GBK"));

GBK与Ascii 相同

posted on 2012-04-24 10:12  雨渐渐  阅读(573)  评论(0编辑  收藏  举报

导航