Wrong line length for headers that are neither pure ASCII nor UTF-8 encoded
Bug #1083216 reported by
Virgile
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
headache (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Ubuntu release: 12.10
package version: 1.03-22
The utf8_length patch for headache does not verify whether the header file is encoded in UTF8 before calling UTF8.length. In particular, if the header file uses another encoding (e.g. iso-latin-1) the result will be incorrect, resulting in a poorly formatted output.
The patch below only calls UTF8.length on a properly UTF8-encoded string, and falls back to String.length otherwise.
To post a comment you must log in.
The attachment "patch for calling UTF8.length only on UTF8-encoded string" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.
[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]