[Development] A bug or not a bug, that's the question
Christoph Feck
christoph at maxiom.de
Mon Aug 26 15:14:57 CEST 2013
On Monday 26 August 2013 14:39:50 Kurt Pattyn wrote:
> On 26 Aug 2013, at 14:26, Christoph Feck <christoph at maxiom.de>
wrote:
> > What do you mean with "maintained as is"? The document you cite
> > does not mention anything related to invalid UTF-8.
>
> Unicode strictly requires no loss of information when going between
> the different representations. Currently the QTextCodec class
> replaces the non-character codes with a replacement character.
> Because there was much confusion whether non-character codes were
> valid or not, the corrigendum was published. That document clearly
> states that they are valid for interchange.
>
> I did the test with UTF-8 encoded non-characters, and QTextCodec
> fails, so it is not unicode compliant.
>
> > Since this is the Qt development list, please discuss code
> > changes needed to clarify what you mean.
>
> I don't have any problem of solving this myself, but first I want
> to be sure if this is considered by the Qt developers as a bug,
> before I move on. I am quite new to this list, so I don't know
> whether this was intentional or not. For that, I don't need to
> point to code I think. Looking into the unit tests of QTextCodec,
> you can clearly see that non-characters are explicitly not allowed
> (so, the QTextCodec behaves as intended). So, was this
> intentional?
Sorry, I was misunderstanding you. I thought you were talking about
invalid UTF-8.
I looked at the code, and it indeed has explicit handling for
QChar::isNonCharacter, which should probably get removed.
Christoph
More information about the Development
mailing list