question

Krzysztofelechowski-3963 avatar image
0 Votes"
Krzysztofelechowski-3963 asked BarrnetZhou-MSFT edited

How to get a shifted multibyte state

1.Is it possible to perform a sequence of operations on a wide-character stream so that its multibyte status will become shifted?
2. If you perform an operation on a narrow-character stream under a multi-byte locale and that operation stops in the middle of a compound character, will its multibyte status become shifted?

c++
· 9
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I think you need to clarify your questions with more detail - it's not clear to me what you're asking.

0 Votes 0 ·

If (s) is a stream then (s .tellg () .state ()) is its multibyte state. Using the codecvt facet of the stream’s locale, it is possible to test whether this state is shifted or not. Design an experiment where the expected result will be shifted.

0 Votes 0 ·
BarrnetZhou-MSFT avatar image BarrnetZhou-MSFT Krzysztofelechowski-3963 ·

I would appreciate it if you could describe the problem in more detail, such as the functions involved, your needs, the purpose and so on. @Krzysztofelechowski-3963

0 Votes 0 ·
Show more comments

0 Answers