From: <yos...@us...> - 2012-10-15 20:56:21
|
Thanks for the proposal. Yes, the support of NUL-terminated strings (length = -1) in U8 macros makes the implementation of ICU APIs much simpler (without the overhead of strlen) and I strongly support this. -Yoshito Markus Scherer <mar...@gm...> wrote on 10/15/2012 04:33:10 PM: > From: Markus Scherer <mar...@gm...> > To: icu-design <icu...@li...>, > Date: 10/15/2012 04:34 PM > Subject: [icu-design] ICU4C API proposal: U8_NEXT etc.: handle NUL- > terminated strings > > Dear ICU team & users, > > I would like to propose the following API for: ICU 51 > Please provide feedback by: next Tuesday, 2012-10-23 > Designated API reviewer: Andy > Ticket: http://bugs.icu-project.org/trac/ticket/9664 > > Many ICU API functions take a string length of -1 to mean that the > input string is NUL-terminated. In the implementation, it would be > convenient if we could use that directly in the U8_NEXT(), U8_GET(), > U16_NEXT() and U16_GET() "safe" macros. > > I propose that we change these 4 macros accordingly, rather than > introducing new macros. > > I propose that we implement the 2 just-proposed new macros > U8_NEXT_OR_FFFD() and U8_GET_OR_FFFD() in the same way. (Ticket #9662) > > Sincerely, > markus > -- > Google Internationalization Engineering |