Closed
Description
EDIT : as I found out this was not a bug in the main branch, I introduced it accidentally in #46405.
Therefore I rename the ticket as "not tested", meaning that current test suite does not cover this case.
Pandas version checks
- I have checked that this issue has not already been reported.
Reproducible Example
import pandas as pd
import locale
locale.setlocale(locale.LC_ALL, "fr_FR")
per = pd.Period("2018-03-11 13:00", freq="H")
assert per.strftime("%Y é") == "2018 é"
Issue Description
When there is a non-ascii character in the formatting string passed to Period.strftime
the result may be corrupted. This is most probably related to an encoding error.
Expected Behavior
The assert should pass without error