﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
1232	Unicode stdout/stderr replacement on Windows fails to print large strings	davidsarah	davidsarah	"While trying to debug #1045, I tried to print a {{{ResponseCache}}} object and got the following exception:
{{{
  File ""d:\tahoe\tahoe-1.8.0c2\src\allmydata\windows\fixups.py"", line 134, in write
    raise IOError(""WriteConsoleW returned %r, n.value = %r"" % (retval, n.value))
exceptions.IOError: WriteConsoleW returned 0, n.value = 0L
}}}

This is a bug in the Unicode stdout/stderr replacement in [source:src/allmydata/windows/fixups.py] that was added in Tahoe-LAFS v1.8 beta. On my machine it fails when trying to print more than 26608 characters at once to stdout or stderr. This appears to be an undocumented limitation of the Windows {{{WriteConsoleW}}} API call.

Technically this is a regression since v1.7.1, although we very rarely print a string that large. The fix is trivial; just limit the length of data passed in a single call to {{{WriteConsoleW}}}."	defect	closed	major	1.8.1	code	1.8.0	fixed	unicode regression easy news-done		
