Thank you.
pointers, because of the many iterations it has to follow.
Rick.
Rick wrote:
I have to use Microsoft VC 6.0 in and old Spanish Application. I need
to
use Spanish special character, such as "?" and stress marks (?, ?, ?,
?,
?). When I run VC I get funny characters on the output.
The system uses ofstream to save data on text files (where the funny
characters are).
This problem is well-known and by far not easy to overcome. FYI, it's not
necessarily that the text-file contains funny characters (after all it
only
contains bytes) but rather that your program and the one you use to watch
it interpret the bytes differently. If I opened one of those files on my
computer, it would probably also look 'funny' but with another set of
funny
characters.
Any simple solution?
The solution I would propose is to store the files in UTF-8, i.e. in a
Unicode-capable format. For that, at least there are sufficient
applications that can read and write this and it is a standard, which
means
that the file (assuming it is recognised as UTF-8 and interpreted
accordingly) will look exactly the same on your computer, mine or one
that
stands in China. Additionally, you could mix Spanish accentuation,
Chinese,
Cyrillic etc in one file.
You can read and write UTF-8 with an appropriate 'codecvt facet' but
converting a legacy program to proper use of Unicode is by far not a
quick
fix and also not trivial.
Uli