https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42024 Bug ID: 42024 Summary: Fix encoding in action_logs.info Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@libriotech.no QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl To reproduce: - Make sure CataloguingLog is enabled - Find a record with at least one item, and go to "Edit" for one item - Add something like this to "x - Non-public note" and "z - Public note" = "ÆØÅ æøå" - Edit the same item again, and just save it without doing any changes (we need to do this step for the æøå to show up in the log viewer) - Verify everything looks OK in the "Normal" view of the record - Go to Tools > Log viewer - Select the "Cataloging" module and click on "Submit" - In the "info" column for the most recent edit, those non-ASCII characters will look like this: 'itemnotes' => "\x{e6}\x{f8}\x{e5} \x{c6}\x{d8}\x{c5}", 'itemnotes_nonpublic' => "\x{e6}\x{f8}\x{e5} \x{c6}\x{d8}\x{c5}" Maybe a problem with how we turn the item data into JSON before we save it to action_logs.info? The item data looks OK in the database: MariaDB [koha_kohadev]> select itemnotes, itemnotes_nonpublic from items where itemnumber = 578; +---------------+---------------------+ | itemnotes | itemnotes_nonpublic | +---------------+---------------------+ | æøå ÆØÅ | æøå ÆØÅ | +---------------+---------------------+ In action_logs, "diff" looks OK: diff: {"D":{"itemnotes_nonpublic":{"O":null,"N":"æøå ÆØÅ"},"cn_sort":{"O":"_","N":""},"itemnotes":{"O":null,"N":"æøå ÆØÅ"},"cn_source":{"O":null,"N":"ddc"},"timestamp":{"N":"2026-03-09 08:18:54","O":"2020-01-29 13:06:23"}}} But "info" is not OK: info: item $VAR1 = { ... 'itemnotes' => "\x{e6}\x{f8}\x{e5} \x{c6}\x{d8}\x{c5}", 'itemnotes_nonpublic' => "\x{e6}\x{f8}\x{e5} \x{c6}\x{d8}\x{c5}", -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.