[Koha-bugs] [Bug 25774] REST API searches don't handle correctly utf8 characters

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Jun 17 15:00:43 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25774

--- Comment #10 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
(In reply to Tomás Cohen Arazi from comment #9)
> (In reply to Jonathan Druart from comment #8)
> > Hum weird, no idea what I did with the test. It should test correctly the
> > changes now.
> > 
> > David, from the JSON pod:
> > """
> > This module also exports to_json and from_json for backward compatibility.
> > These are slower, and may expect/generate different stuff from what
> > encode_json and decode_json do, depending on their options. It's better just
> > to use Object-Oriented interfaces than using these two functions.
> > """
> > 
> > We should use JSON->decode, see the last patch.
> 
> What about 
> 
>   my $json = JSON->new->utf8;
> 
> ?

Forget about that last comment. Setting ->utf8 would mean we would need to
explicitly call encode_utf8 on the string as the original patch did [1]

[1] utf8 flag disabled section in
https://metacpan.org/pod/JSON#ENCODING/CODESET-FLAG-NOTES

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list