I am trying to understand the difference between UTF-8, ASCII, and Unicode. I've already read [Unicode, UTF, ASCII, ANSI format differences](https://stackoverflow.com/questions/700187/unicode-utf-ascii-ansi-format-differences).
But I am getting some error from Python and I don't know how I can see which kind of format my string has.

For example:

```
1# 'Klaus-Groth-Stra&#223;e, Ballahausen'
2# 'Capit\xe1n\n'
3# u'Capit\xe1n\n'

```

I surmise that

* 3# = Unicode because of the `u'`?
* 1#=?
* 2#=?

I already tried to write string #1 to a file and wrote myself a small function

```
def escape(html):
 html=html.replace('&#246;','ö')
 html=html.replace('&#214;','Ö')
 html=html.replace('&#228;','ä')
 html=html.replace('&#196;','Ä')
 html=html.replace('&#252;','ü')
 html=html.replace('&#220;','Ü')
 html=html.replace('&#223;','ß')
 return html

```

Before I am going to write my string to a `txt` file, I want to replace the letters to get the right spelling in my text file (*Klaus-Groth-Straße, Buchholz in der Nordheide*).

But it's not working :/ 

Could you tell me which kind of string my 3 examples belong to - Unicode or ASCII or UTF-8? And how do I write the right spelling to a `txt` by using a string like #1?