ASCII character being mangled using Print

  • Thread starter Thread starter hirvonen
  • Start date Start date
H

hirvonen

Not sure if this is the most appropriate forum for my question, but
here goes. I have an Access 2002 database table with a memo field into
which I've entered the ± character (using the keystroke ALT+0177). It
displays fine in the table and form, no problems. I then have some VBA
code which takes a bunch of data from various tables and generates some
HTML documents. I do this by using something like:

Open "c:\filename.txt" For Output As #FileNumber

and then a bunch of something like:

Print #FileNumber, "whatever"

Straightforward, and it works fine on my PC - the output HTML contains
the original ± characters and looks OK in a web browser.

However, on a colleague's PC, when they run the code to generate the
HTML, in the output file the ± has been replaced by two characters
¡Ó which is ALT+0161 and ALT+0211. We are both using Access 2002, the
exact same copy of the database. But I am running Win2K, she is using
WinXP.

For the moment I've got around it by telling her to enter ± into
the Access database rather than using ALT+0177, as this then is passed
through to the HTML without being altered, and thus appears correctly
as ±. But this is a pain and is ugly! I'd rather figure out why it's
not working correctly for her only.

Has anyone encountered a similar problem? My guess is that it's some
bizarre unicode conversion god-knows-what, but I can't figure it out.

Any help hugely appreciated,
Markko
 
I wrote above:

"For the moment I've got around it by telling her to enter ± into
the Access database rather than using ALT+0177"

What I actually did was tell her to enter the HTML special character
code:

ampersand-hash-177-semicolon

When I typed this in the original post it was of course displayed as
±, doh!

Markko
 
Back
Top