On 02/10/2013 12:09 PM, Patrick Mylund Nielsen wrote:
> Check before and reject it if it's not UTF8 like you're doing? If some
> of it's bad, you probably don't want to accept a payload from a bad
> encoder anyway.
>
>
Of course that's possible, but what does the byte sequence
[]byte{0xef, 0xbf, 0xbd}
mean? That's what I get from json.Unmarshal for the latin-1 encoded "Ö"
(= \xD6 )
> On Sun, Feb 10, 2013 at 12:06 PM, Johann Höchtl
> <
johann....@gmail.com <mailto:
johann....@gmail.com>> wrote:
>
> JSON is required to be in utf8 per the spec. Do I have any chances
> to check after Unmarshal, if eg. a stringcontained invalid utf8 -
> characters?
>
>
http://play.golang.org/p/NW4b3LLMPy
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to
golang-nuts...@googlegroups.com
> <mailto:
golang-nuts%2Bunsu...@googlegroups.com>.