=?ISO-8859-1?Q?Re:_Strange_Spanish_Question_Mark_(=BF)_Appearance_at?=
=?ISO-8859-1?Q?_the_Very_Beginning_of_Output_HTML_Files_Using_C++?=
On Jan 10, 6:48 am, Jack Klein <jackkl...@spamcop.net> wrote:
On Thu, 10 Jan 2008 00:31:19 -0500, maria <maria@maria_de_napoli.com>
wrote in comp.lang.c++:
I only use C++ with Visual Studio 6.0 for string manipulations in
thousands of HTML pages on my website. Many times, the output files of
many of my C++ programs contain a spanish question mark ( =BF) as thei=
r
first character. What creates it? How do we avoid it?
Thanks!
My crystal ball says that the error is on line 42.
If you, who can look at the source code all you want, haven't found
the error, how do you expect anyone else to do so, without seeing the
code?
That character is there because your program writes it there. The
answer can only be found in your program.
More likely, the error is related to his environment, and
character coding issues. If he writes his code supposing one
encoding (perhaps unintentionally, he might just suppose the
encoding of his editor), and views the outpu in another, wierd
things can and will happen.
Of course, you're right that we don't have enough information to
even start guessing, and knowing exactly what he's trying to
output would certainly help. As would knowning how he's viewing
the files, to determine the presense of this character; even
more useful would be a hex dump of the start of the file. (In
Unicode and ISO 8859-1, the inverted question mark is 0xBF. I
don't see anything off hand which might insert such a character
arbitrarily, but perhaps the actual value in the file is
something else, which his viewing environment displays as an
inverted question mark.)
--
James Kanze (GABI Software) mailto:james.kanze@gmail.com
Conseils en informatique orient=EF=BF=BDe objet/
Beratung in objektorientierter Datenverarbeitung
9 place S=EF=BF=BDmard, 78210 St.-Cyr-l'=EF=BF=BDcole, France, +33 (0)1 30 2=
3 00 34