bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70356: 30.0.50; [wishlist] Expose UTF-8 parse error to Lisp


From: Michael Albinus
Subject: bug#70356: 30.0.50; [wishlist] Expose UTF-8 parse error to Lisp
Date: Sat, 13 Apr 2024 09:24:37 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

Hi Eli,

>> json_parse_string checks for a valid UTF-8 byte sequence, and raises an
>> error in case of. It would be useful, if this error handling would be
>> exposed to Lisp. For example, it could be used to check a D-Bus
>> byte-array for proper UTF-8 syntax in dbus-byte-array-to-string.
>
> Sorry, I don't understand: errors we signal are always "exposed to
> Lisp": e.g., your program could catch the error and do whatever it
> wants.  What exactly is missing?

I'm not interested in JSON here. I've mentioned json_parse_string
because it contains the functionality I'm looking for.

What I'd like to get is a function, which takes a sequence of bytes as
arguments, and which indicates, whether this is a valid UTF-8 byte
sequence. This indication could be an error, or a respective return
value.

Best regards, Michael.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]