J
JH Trauntvein
I recently learned about the codecvt locale facet by reading Jossutis'
(forgive me if I just misspelled his name) book on the C++ standard
library (this book has been worth its weight in gold by the way and I
would like to thank him for writing it). However, the book didn't have
much by the way of examples of using various methods of this facet. I
therefore turned to the documentation that comes with visual studio
..Net.
Several functions in that facet, in(), out(), length(), and etc.
require a reference parameter of mbstate_t. The documentation that I
have read says nothing about values for this variable and I assume that
the actual values used will vary by multi-byte encoding scheme. The
question that I have is what the default value of this variable should
be. Its purpose is to carry a state between calls so I assume that it
must have some sort of default value that identifies an appropriate
starting state. I have assumed that the value of zero will work but
this is a guess. Is my assumption about the default value correct?
Regards,
Jon Trauntvein
(forgive me if I just misspelled his name) book on the C++ standard
library (this book has been worth its weight in gold by the way and I
would like to thank him for writing it). However, the book didn't have
much by the way of examples of using various methods of this facet. I
therefore turned to the documentation that comes with visual studio
..Net.
Several functions in that facet, in(), out(), length(), and etc.
require a reference parameter of mbstate_t. The documentation that I
have read says nothing about values for this variable and I assume that
the actual values used will vary by multi-byte encoding scheme. The
question that I have is what the default value of this variable should
be. Its purpose is to carry a state between calls so I assume that it
must have some sort of default value that identifies an appropriate
starting state. I have assumed that the value of zero will work but
this is a guess. Is my assumption about the default value correct?
Regards,
Jon Trauntvein