Help with accents in text strings

Hello everyone, I would like you to help me with the following:

I’m calling a text with the method “document.getElementById (“id”). TextContent;”

But does he return the characters with an accent a “?”
I want you to help me please, thank you.