|
From: | Markus Mützel |
Subject: | [Octave-patch-tracker] [patch #9980] JSON encoder and decoder, alternative to object2json |
Date: | Thu, 29 Oct 2020 12:38:51 -0400 (EDT) |
User-agent: | Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36 Edg/86.0.622.56 |
Follow-up Comment #26, patch #9980 (project octave): The "invalid UTF-8" error is probably because `regexp` requires UTF-8 encoded input in Octave 6 or newer. I guess the input file has a different encoding. In Octave 6 or newer you can specify the encoding when opening a file with `fopen`. Otherwise you could use `native2unicode` to convert from whatever input encoding to UTF-8. AFAICT, this is not a problem of `fromJSON` (which accepts strings). The problem is that an invalid string is passed to that function. The file has to be read with the correct encoding or the read byte stream has to be converted from that encoding to a valid string. _______________________________________________________ Reply to this item at: <https://savannah.gnu.org/patch/?9980> _______________________________________________ Message sent via Savannah https://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |