Ticket #671 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Unicode in buildslave info causes error in new jinja web [regression]

Reported by: Nicolas Owned by: marcusl
Priority: minor Milestone: 0.8.+
Version: Keywords: jinja
Cc:

Description

I have always had Unicode characters in my buildslave's info/admin: "Nicolás Alvarez <my@email>".

Today I upgraded buildbot to latest git (6a73602), with the new jinja-based WebStatus. Every page that would show the admin info throws an exception, such as the list of buildslaves or the page for a builder my slave is attached to.

I consider this a regression, since the Unicode characters worked just fine in 0.7.x. I set the priority to 'minor' because it's easy to workaround (don't use Unicode chars), but feel free to change.

Exception page attached (edited to remove the email addresses; damn spammers).

Attachments

buildslaves.html Download (25.6 KB) - added by Nicolas 2 years ago.
Stacktrace page returned from /buildslaves

Change History

Changed 2 years ago by Nicolas

Stacktrace page returned from /buildslaves

comment:1 Changed 2 years ago by Nicolas

  • Keywords jinja added

comment:2 Changed 2 years ago by marcusl

  • Owner set to marcusl
  • Status changed from new to accepted

Good catch, will fix that.

comment:3 Changed 2 years ago by marcusl

Just to document this further, jinja by default assumes that byte-strings (not unicode) are in the default ascii locale. So, in order to use unicode, one must must explicitly decode strings giving the proper encoding.

I'll assume that the info files are in utf-8. (UTF-16 in text files will surprise many, I think.)

comment:4 Changed 2 years ago by marcusl

  • Status changed from accepted to closed
  • Resolution set to fixed
commit d9699cab0dc8d8d1f5a31b9266a9ddd790f0a9af
Author: Marcus Lindblom <macke@yar.nu>
Date:   Thu Jan 7 19:32:01 2010 +0100

    Decode slave host & admin data as utf-8 (fixes #671)
Note: See TracTickets for help on using tickets.