Блог пользователя moss3s

Автор moss3s, история, 6 лет назад, По-английски

Hi. I'd like to tell you short story.

Do you like to get outcomes like this?

wrong answer 1st words differ - expected: '1/2', found: '1/2'

I was bit confused. 46296564

After short experiment i've got OK with exactly? same code: 46298129. Look inside, compare, are the sources same?

The only difference is in BOM (byte order mark, prefix 0xEF,0xBB,0xBF of file).

The first submission is source code in utf-8 with BOM, the second one has no BOM. It turns out, if source code contains BOM, php produces stdout with BOM, and of course checker can not parse it correctly.

Seems to be bug in php.

P.S. Please, don't ask, why php :D

Теги php, bom, fun, bug
  • Проголосовать: нравится
  • +117
  • Проголосовать: не нравится

»
6 лет назад, # |
  Проголосовать: нравится +41 Проголосовать: не нравится

To me, looks like supporting outputs starting with BOM in checkers (via a patch in testlib) is at least worth considering.