Another encoding problem....but on a webserver

I have some Unicode (specifically this character '\u00e1') that when I am on my home machine in pycharm will print just fine (either with print command or without).

However, when I am on my webserver, writing a pretty simple python generated webpage (just using cgi) and printing the same string of Unicode my webpage returns a server error. I have tried:

1.

print(string)

no go, error is:

'ascii' codec can't encode character '\xe1' in position 30: ordinal not in range(128) 

2.

print(string.encode(encoding).decode(encoding))

it also breaks with the same error:

'ascii' codec can't encode character '\xe1' in position 30: ordinal not in range(128)

The only thing that lets the python script actually work is

print(string.encode(encoding))

but this prints out the b'' for bytes around the string, as well as showing the Unicode code, not the character.

I'm going crazy over here, I think it is something on the server, because like I said, I am able to print the string fine on my home system.

I have the charset=utf-8 in my header, and I have

-*- coding: utf-8 -*-

in my python code.

is there a setting on the server I am overlooking? server is apache2 I checked my $LANG in the server. it is en_US.UTF8. why the ascii error ??

thanks