Skip to content

Fix "Wide character in print" warnings from WeBWorK::Debug::debug. - #3280

Open
drgrice1 wants to merge 1 commit into
openwebwork:developfrom
drgrice1:debug-wide-character-in-print
Open

drgrice1 wants to merge 1 commit into
openwebwork:developfrom
drgrice1:debug-wide-character-in-print

Conversation

@drgrice1

Copy link
Copy Markdown
Member

Debug messages printed to STDERR were not encoded, and so messages containing wide characters caused warnings. Encode them as UTF-8 first.

This issue occurs when the general debugging facility is enabled in the conf/webwork2.mojolicious.yml file and the logfile is not set (or if the logfile is set, but cannot be opened). So this is typically only when using morbo, since usually you would use the logfile setting in production with hypnotoad.

One way to test this is to enable debugging and go to the set detail page and edit a set for a user and press "Save Changes" (you don't need to actually change any settings). Since the dates contain narrow non-breaking space you will see a warning about a wide character in print.

Debug messages printed to STDERR were not encoded, and so messages
containing wide characters caused warnings. Encode them as UTF-8 first.

This issue occurs when the general debugging facility is enabled in the
`conf/webwork2.mojolicious.yml` file and the `logfile` is not set (or if
the `logfile` is set, but cannot be opened). So this is typically only
when using morbo, since usually you would use the `logfile` setting in
production with hypnotoad.

One way to test this is to enable debugging and go to the set detail
page and edit a set for a user and press "Save Changes" (you don't need
to actually change any settings).  Since the dates contain narrow
non-breaking space you will see a warning about a wide character in
print.
@drgrice1
drgrice1 force-pushed the debug-wide-character-in-print branch from 7aceab5 to 4865341 Compare November 12, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants