[Koha-devel] Fundamental flaw in Koha REST API

David Cook dcook at prosentient.com.au
Mon Dec 5 23:40:00 CET 2022


Hi all,

 

Just wondering if my email titled “x-koha-query header doesn't support UTF-8
data” actually made it to the koha-devel list as I didn’t get any replies to
what I perceive as a significant issue.

 

Basically, the x-koha-query header can only support ISO 8859-1/Latin-1
encoded characters. If you try to send UTF-8 encoded data to the API via
Javascript, it will silently fail. See Bug 32401 for a practical example of
this.

 

I encountered this issue when using Arabic, but it is also obvious when
using Hebrew, Chinese, Devanagari, or any non-Latin based script. 

 

It is less obvious – but still a problem – for some languages like Dutch,
Finnish, French, and German. For instance, a x-koha-query header containing
the French word “cœur” will fail, because œ is not a ISO 8859-1/Latin-1
character. (See the Wikipedia entry for ISO 8859-1 for more examples of
problems with languages mostly covered by Latin-1.)

 

Koha devs need to discuss this and possibly remove “x-koha-query” from Koha.


 

At the moment, it’s not widely used by Koha itself, so I don’t think it will
be hard to remove from Koha, but any third-party integrations would need to
refactor to use a different option. 

 

Anyway, it would be great if someone could acknowledge receipt of this
email. 

 

I have figured out how to get DataTables to stop using x-koha-query, so I’m
going to do that for the particular acquisitions problem mentioned in Bug
32401, but we do need to talk about this issue. 

 

David Cook

Senior Software Engineer

Prosentient Systems

Suite 7.03

6a Glen St

Milsons Point NSW 2061

Australia

 

Office: 02 9212 0899

Online: 02 8005 0595

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20221206/e423422a/attachment.htm>


More information about the Koha-devel mailing list