Another json4s incompatibility - utf-8 escaping for €

0 views
Skip to first unread message

François ARMAND - Rudder

unread,
Feb 5, 2026, 8:39:40 AM (2 days ago) Feb 5
to lif...@googlegroups.com
Hello, 

We are also testing the migration to lift 4/json4s, and we fumbled upon an escape problem: there is too many UTF-8 symbols escaped, in particular the "€" one, which is a difference from lift-json (and I think most JSON frameworks). 

We found a reference to that fact in that issue message: https://github.com/json4s/json4s/issues/750#issuecomment-761571297 
But it doesn't look to have been followed by an other issue/PR. 
Should I open a ticket in json4s github? 

Thanks, 


--
François ARMAND
CTO
T: +33 183 62 99 23   M: +33 663 37 60 55

Andreas Joseph Krogh

unread,
Feb 5, 2026, 8:57:32 AM (2 days ago) Feb 5
to lif...@googlegroups.com

The issue you link to is closed, is this still a problem?

What exactly doesn't work in current master ?

Do you have any sample code showcasing the  problem?

 

--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963

-- 
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/liftweb/47892ba3-07f9-4bdf-a1f3-c5163c90a76a%40rudder.io.
 

François ARMAND - Rudder

unread,
Feb 5, 2026, 9:27:37 AM (2 days ago) Feb 5
to lif...@googlegroups.com

On 05/02/2026 14:57, Andreas Joseph Krogh wrote:

The issue you link to is closed, is this still a problem?

What exactly doesn't work in current master ?

Do you have any sample code showcasing the  problem?


Yes, sorry I wasn't clear: it's the specific comment on that closed issue, which was dealing with the escaping of € and other utf-8 symbols that should not. I believe an other issue should have been opened, but I didn't find any. 

The test case in the comment still apply: 

scala> println(pretty(render(JString(""))))
"\u20ac"

In lift-json, we get "€". 

And the following part of the comment still seems to be the case in master: 

The code to determine the target of escaping is as follows, but it is excessive.

(c >= '\u0000' && c <= '\u001f') || (c >= '\u0080' && c < '\u00a0') || (c >= '\u2000' && c < '\u2100')

In particular the intervalle between 2000 and 2100 contains a lot of standard UTF-8 symbol. Perhaps it should be 2070 if the intent was to avoid punctuation and spaces?



Reply all
Reply to author
Forward
0 new messages