ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Общий форум

Java support
Послано Fyodor Menshikov 11 сен 2009 16:49
According to Java language specification, identifiers in Java can contain any Unicode letters, in particular, Russian ones. For example, here is correct solution of A+B problem:

void реши() {
   Scanner ввод = new Scanner(System.in);
   PrintWriter вывод = new PrintWriter(System.out);
   int а = ввод.nextInt();
   int б = ввод.nextInt();
   int сумма = а + б;
   вывод.println(сумма);
   вывод.close();
}

And such solution gets Accepted... but only if it is written in windows-1251 encoding and submitted as file. If its text is inserted into submission form, the system stores file in utf-8 encoding but javac compiler uses default source encoding - windows-1251.

Admins, is it possible to fix the bug? Maybe text submitted through form could be compiled by different command line (with "-encoding utf-8" key)? Or maybe it is better to use this key even in the case of file upload - utf-8 is more "internationalization-friendly" than windows-1251.
Re: Java support
Послано [SPbSU ITMO] WiNGeR 12 сен 2009 01:04
Does anyone really use this feature?