[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How do I make sure that a string is compatible with JSON (utf-8/16/32)?
- From: Sean Conner <sean@...>
- Date: Tue, 1 Oct 2013 12:24:50 -0400
It was thus said that the Great Enrique Garcia Cota once stated:
> So far I've been able to validate utf-8 strings:
>
> https://github.com/kikito/utf8_validator.lua
>
> It parses all the bytes in the string and makes sure they all conform to
> UTF-8.
>
> I'm now looking for ways to validate utf-16 & utf-32 (as well as their LE &
> BE versions). I have so far not found how to do that on the unicode
> standard.
>
> If someone has prior knowledge on that, please give a shout here.
If you have the iconv library installed, you could use that. It's fairly
easy to use, and very comprehensive.
-spc