This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: is the concept of codecvt_t::partial broken ?
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Oncaphillis <oncaphillis at snafu dot de>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Wed, 26 Sep 2012 12:30:44 +0200
- Subject: Re: is the concept of codecvt_t::partial broken ?
- References: <5062D678.1060603@snafu.de>
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.