|
|
|
Проблема с кодировкой при записи в файл....
|
|||
|---|---|---|---|
|
#18+
Привет всем. Я качаю файл следующим образом: public static void main(String[] args) throws Exception { URL yahoo = new URL("http://10.1.12.2/stat/lightstatxml.php?branch=670"); URLConnection yc = yahoo.openConnection(); BufferedReader in = new BufferedReader( new InputStreamReader( yc.getInputStream())); String inputLine; DataOutputStream OutStream; OutStream = new DataOutputStream( new BufferedOutputStream( new FileOutputStream("d:/output.txt"))); while ((inputLine = in.readLine()) != null) { OutStream.writeBytes(inputLine+"\n"); System.out.println(inputLine); } in.close(); OutStream.flush(); } И на консоль он выводиться нормально а в файле output.txt не отображает коректно русские символы. В файле : <dates>31/05/2006 10:44</dates> <name><03078= "">@3. A28B", C;.;C:8, 45</name> На консоле: <dates>31/05/2006 10:44</dates> <name>магазин "Торг. свит", ул.Злуки, 45</name> ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 31.05.2006, 11:56 |
|
||
|
|

start [/forum/topic.php?fid=59&msg=33762919&tid=2149087]: |
0ms |
get settings: |
6ms |
get forum list: |
9ms |
check forum access: |
2ms |
check topic access: |
2ms |
track hit: |
175ms |
get topic data: |
10ms |
get forum data: |
2ms |
get page messages: |
52ms |
get tp. blocked users: |
1ms |
| others: | 240ms |
| total: | 499ms |

| 0 / 0 |
