This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Adding mbstate_t, mbsinit(), mbrtowc(), mbrlen() etc.


Kazuhiro Fujieda wrote:
> 
> >>> On Wed, 04 Sep 2002 20:32:30 -0400
> >>> "J. Johnston" <jjohnstn@redhat.com> said:
> 
> >   This is just to let you know that I am working on fixing the
> > behavior of the restartable functions to work properly.  I
> > already have C-JIS working for _mbrtowc_r which should be the
> > most difficult of the bunch.  I wanted you to know so you do
> > not waste any time by making similar modifications.
> 
> Thank you. I'm glad to hear it.
> Are you going to work on others?

Yes.  I believe I have it all working now.  Just have to do a bit more testing as
I have touched a lot of code.

> If so, there is a point to notice on C-UTF-8.
> 
> The motivation to define WCHAR_MAX is that this is necessary to
> write C-UTF-8 part of _mbrtowc_r properly. If wchar_t doesn't
> have enough size to contain an UCS-4 character, _mbrtowc_r have
> to return EILSEQ against a multibyte character larger than 4
> bytes in UTF-8 encoding.

Thanks, I have added a check for such a scenario.

-- Jeff J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]