Message226114
| Author |
terry.reedy |
| Recipients |
AndiDog_old, BreamoreBoy, eric.smith, ezio.melotti, terry.reedy, vstinner |
| Date |
2014年08月30日.02:14:41 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1409364882.54.0.451305044176.issue8304@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
I verified Marks 3.4.1 result with Idle.
It strikes me as a bug that a function that maps a unicode format string to a unicode string with interpolations added should ever encode the format to bytes, lets alone using using an encoding that fails or loses information. It is especially weird given that % formatting does not even work (at present) for bytes.
It seems to me that strftime should never encode the non-special parts of the format text. Instead, it could split the format (re.split) into a list of alternatine '%x' pairs and running text segments, replace the '%x' entries with the proper entries, and return the list joined back into a string. Some replacements would be locale dependent, other not.
(Just wondering, are the locate names of days and months bytes restricted to ascii or unrestricted unicode using native characters?) |
|