
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
31.05.2006, 11:56
|
|||
|---|---|---|---|
Проблема с кодировкой при записи в файл.... |
|||
|
#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> ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=59&tablet=1&tid=2149087]: |
0ms |
get settings: |
9ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
55ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
31ms |
get tp. blocked users: |
1ms |
| others: | 252ms |
| total: | 380ms |

| 0 / 0 |
