emacs-devel
[Top][All Lists]
Advanced

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

JSON parsing of Extended ASCII


From: Felix Weilbach
Subject: JSON parsing of Extended ASCII
Date: Tue, 10 May 2022 19:18:37 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1

Hello,


I'm working on source code that has Extended ASCII characters inside comments in it. This is unfortunate because LSP-mode crashes if it encounters an invalid UTF-8 string. I know this mailing list is not about LSP-mode, but I could track down the issue to the function json_stringn() that gets called in lisp_to_json() inside json.c. Visual Studio Code can cope with these files fine and their LSP implementation has no problem with these files. Therefore I think Emacs should handle this situation as well. I want to find a solution to this problem and implement it. What do you think about this problem? Have you ideas for a solution? Should a potential solution be implemented inside Emacs or LSP-mode?

I think there could be implemented a function inside Emacs that tries to convert Extended ASCII to UTF-8 and then encodes it to JSON.


Kind regards

Felix Weilbach




reply via email to

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