Python 2.7: u"'\ufffd' cannot start a field name" not found in u"...'\xc5'
cannot start a field name. ..."
Python 3.5: "'�' cannot start a field name" not found in "... 'Å' cannot
start a field name. ..."
--
Ticket URL: <https://code.djangoproject.com/ticket/26692>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by timgraham):
On #django-dev, Ramiro says, "That \ufffd Unicode code point is «used to
replace an incoming character whose value is unknown or unrepresentable in
Unicode». That's what gives me the hint this is some encoding mi-
coordination between the multiple parts involved that doesn't work on
Windows like it does on Linux et al. My current plan would be to change
the string we look for to simply "' cannot start a field name".
--
Ticket URL: <https://code.djangoproject.com/ticket/26692#comment:1>
* owner: nobody => ramiro
* keywords: => msgfmt i18n windows compilemessages non-ascii unicode
* has_patch: 0 => 1
* status: new => assigned
Comment:
[https://github.com/django/django/pull/6681 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/26692#comment:2>
* stage: Accepted => Ready for checkin
Comment:
(copying this analysis from the pull request)
Combination of:
* Peculiarities of GNU gettext tools handling of error reporting (via
sdterr)
* The fact that for this test we need to set the `LANG` env var to `"C"`
to ensure such error messages are emitted in English
* Special characteristics of the Windows console regarding handling of
encoding
Makes it hard to portably test for the actual content of the `msgfmt(1)`
error message that includes the culprit Unicode code point, as exercised
by the
`i18n.test_compilation.CompilationErrorHandling.test_msgfmt_error_including_non_ascii`
test.
Proposed solution is to simply drop it but still check for other parts
of the expected error message.
--
Ticket URL: <https://code.djangoproject.com/ticket/26692#comment:3>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"71421e8f8766525e709397f14e100f2846849df0" 71421e8f]:
{{{
#!CommitTicketReference repository=""
revision="71421e8f8766525e709397f14e100f2846849df0"
Fixed #26692 -- Relaxed an i18n compilemessages test.
The actual non-ASCII character differs on Windows.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26692#comment:4>
Comment (by Tim Graham <timograham@…>):
In [changeset:"777bc8f7d660147a40b61195d2e9cfa8d9750f09" 777bc8f7]:
{{{
#!CommitTicketReference repository=""
revision="777bc8f7d660147a40b61195d2e9cfa8d9750f09"
[1.10.x] Fixed #26692 -- Relaxed an i18n compilemessages test.
The actual non-ASCII character differs on Windows.
Backport of 71421e8f8766525e709397f14e100f2846849df0 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/26692#comment:5>