Problem with some characters

I’m trying to make a digital firm with SHA1 but i have problem with some
characters.

Digest::SHA1.hexdigest("#{@league.name}.#{current_user.name}.#{@num_scores}")

When @leagues.name is for example “así” the firm generated is not
correct. I think the “í” makes a mess with this.

Can you help me please?