ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Common Board

Java support
Posted by Fyodor Menshikov 11 Sep 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
Posted by [SPbSU ITMO] WiNGeR 12 Sep 2009 01:04
Does anyone really use this feature?