Ask Your Question

strings with £ now appear as Â£

asked 2018-10-04 13:28:00 -0600

Michael Stroud's avatar

updated 2019-03-13 10:22:26 -0600

I downloaded and installed Wing Pro today then added a project I had been working on in IDLE IDE. I am running with python 3.7 on Windows 10. The problem is all the strings with £ now appear as Â£. I use £ extensively as the UK currency symbol. For example:

if int_pence > 0:
    return '£' + "{:,.2f}".format(pnds_float)

What should I do?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-10-04 14:51:00 -0600

Is there an encoding comment at the top of the file?  I suspect this is a utf8 file with no encoding comment on Windows.  You could either add a utf8 encoding comment or set the default file encoding on the Files page of the Preferences dialog.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-10-04 13:28:00 -0600

Seen: 530 times

Last updated: Mar 06 '19