[Interest] Why there is no QChar::toLocal8Bit()?

Prav pr12og2 at programist.ru
Mon Apr 11 10:41:13 CEST 2016


 Hi, Thiago.


>> And last question ... is there a way to find out what type of encoding was
>> done by toLocal8Bit? sigle-byte or multi-byte or 16- or 32-bit
> As I said, it's not 16- or 32-bit because that's going to break other software. So it's 8-bit.
??? ... earlier I asked

>>> So never assume that toLocal8Bit will always give you a single-byte or
>>> multi-byte string. It varies not only per OS, but also per user.
>> But is this codec always NOT a 16-bit codec and NOT a 32-bit codec?
and you answered
>Why not?

For me "why not" mean that everything is possible. So it could be 16- or 32-bit.
Probably I did not get your's "why not?" ... because now you are saying it can NOT be 16- or 32-bit!

Well ... сan you clarify your answer please?


> Whether it's single-byte or multi-byte, you can't get that information. More
> to the point, I'd say that you should not even ask that question. That
> indicates you're making wrong decisions and your software has design flaws.
> Instead, redesign so you don't need to answer the question in the first place.
Ok ... probably you are right ... probably I made XY-asking mistake here ... sorry ... so may be I need to ask another way.
How can I know that my QSting can be converted successfully with Local code page (local encoding) to signle-byte string?




More information about the Interest mailing list