json-ada icon indicating copy to clipboard operation
json-ada copied to clipboard

Unicode

Open HROMANO opened this issue 2 years ago • 2 comments

As the RFC requires JSON files to be Unicode (and preferably UTF-8), is there a reason to not support Unicode?

It makes the library unusable when strings are not latin1 (and that's often the case).

Are there plans to default to UTF-8 encoding?

Thanks

HROMANO avatar Oct 06 '23 07:10 HROMANO

RFC 8259 states:

8.1 Character Encoding

JSON text exchanged between systems that are not part of a closed ecosystem MUST be encoded using UTF-8 [RFC3629].

Nobody asked for that to my knowledge. Should be fixed

RREE avatar Oct 17 '23 19:10 RREE

I'm using an older RFC, 7159. The library may actually be able to accept Unicode, but it does raise a Program_Error if it finds \u in the string. The reason is that I never bothered to learn how to deal with what follows \u because I'm an ASCII person in real life. I'm happy to accept a PR that implements some code that handles escaped Unicode. Alternatively, a non-code contribution (guidance, explanations, links) could help me to implement it.

onox avatar Jul 22 '24 18:07 onox