+ if ( srcLen == 0 )
+ {
+ // there is nothing left except the BOM so we'd return 0 below but
+ // this is unexpected: decoding a non-empty string must either fail
+ // or return something non-empty, in particular this would break
+ // the code in wxTextInputStream::NextChar()
+ //
+ // so still return an error as we need some more data to be able to
+ // decode it
+ return wxCONV_FAILED;
+ }