[Bug 32090] New: Emojis (or other utf8 characters) can break background job processing
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32090 Bug ID: 32090 Summary: Emojis (or other utf8 characters) can break background job processing Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Change your user's first name to be: Developer 😺 Do something that enqueues a background job Check the logs: Wide character in subroutine entry at /usr/share/koha/lib/Koha/BackgroundJob.pm line 170. Comes from: 263 Returns a JSON object with utf8 disabled. Encoding to UTF-8 should be 264 done later. 265 266 =cut 267 268 sub json { 269 my ( $self ) = @_; 270 $self->{_json} //= JSON->new->utf8(0); # TODO Should we allow_nonref ? 271 return $self->{_json}; 272 } Maybe we should not do that later? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32090 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com, | |m.de.rooy@rijksmuseum.nl, | |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32090 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Nick Clemens from comment #0)
Change your user's first name to be: Developer 😺
Ok. You are asking for trouble :)
Maybe we should not do that later?
No. You create a lot of problems when you encode in the middle of the process. The idea is: decode at start, encode at the end. Keep everything in perl internal format in between. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32090 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #1)
No. You create a lot of problems when you encode in the middle of the process. The idea is: decode at start, encode at the end. Keep everything in perl internal format in between.
Note that I had utf8 here more in mind than JSON btw. But it follows a similar pattern.. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org