is the concept of codecvt_t::partial broken ?

Paolo Carlini paolo.carlini@oracle.com
Wed Sep 26 10:31:00 GMT 2012


Hi,

On 09/26/2012 12:18 PM, Oncaphillis wrote:
> Hi,
> I'm writing yet another char encoding translator with the help of 
> codecvt< >
> and stumbled across the following problem. When I try to interprese a 
> byte sequence
> as ShiftJis I never get the result code codcvt_t::partial even if I 
> feed a single
> 0xe0 as the only input which the iconv should interprete as an 
> incomplete two byte
> sequence. The same seems to hold true with other multi char encodings 
> as well
now I don't have the time to analyze the details of this (and it would 
be very difficult without a complete self-contained testcase) but in 
general the current codecvt code works pretty well for us. I would 
suggest: 1- Have a look to the existing testcases in our testsuite, 
which all pass, and see if you can learn something from those about your 
specific case; 2- We may have issues with encoding -1 locales, thus I 
would at first try >= 0 locales. ja_JP.sjis is -1, right?

Thanks,
Paolo.



More information about the Libstdc++ mailing list