Yes, it assumes the input is utf-8. From src/base/json_reader.h: // Known limitations/deviations from the RFC: // - Assumes input is encoded as UTF8. The spec says we should allow UTF-16 // (BE or LE) and UTF-32 (BE or LE) as well.
On Tue, 24 Mar 2009, Book'em Dano wrote: > > Awesome. Thanks PK and SC for your prompt replies. I was unaware that > <snip>general pattern in the code is that narrow strings are UTF-8</ > snip>. Good to know. > > On Mar 24, 9:30 pm, Peter Kasting <[email protected]> wrote: > > On Tue, Mar 24, 2009 at 8:57 PM, Book'em Dano <[email protected]> wrote: > > > Hi guys, > > > > > I notice that JSONStringValueSerializer in chrome\common takes a > > > narrow string. It expects a UTF8 encoded string, right (i.e. it > > > doesn't have to be ASCII only)? > > > > The general pattern in the code is that narrow strings are UTF-8 unless > > explicitly commented some other way (with ASCII usually being that commented > > exception). So I would expect that yes, this takes UTF-8. > > > > PK > > --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
