Commit fc76d63
committed
- Patch #1400181, fix unicode string formatting to not use the locale.
This is how string objects work. u'%f' could use , instead of .
for the decimal point. Now both strings and unicode always use periods.
This is the code that would break:
import locale
locale.setlocale(locale.LC_NUMERIC, 'de_DE')
u'%.1f' % 1.0
assert '1.0' == u'%.1f' % 1.0
I couldn't create a test case which fails, but this fixes the problem.
Will backport.1 parent ab92afd commit fc76d63
2 files changed
Lines changed: 25 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
15 | 19 | | |
16 | 20 | | |
17 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6579 | 6579 | | |
6580 | 6580 | | |
6581 | 6581 | | |
6582 | | - | |
6583 | | - | |
| 6582 | + | |
| 6583 | + | |
6584 | 6584 | | |
6585 | | - | |
6586 | | - | |
6587 | | - | |
6588 | | - | |
6589 | | - | |
6590 | | - | |
6591 | | - | |
6592 | | - | |
6593 | | - | |
6594 | | - | |
| 6585 | + | |
| 6586 | + | |
6595 | 6587 | | |
6596 | 6588 | | |
6597 | 6589 | | |
6598 | | - | |
6599 | 6590 | | |
6600 | 6591 | | |
6601 | 6592 | | |
| 6593 | + | |
| 6594 | + | |
| 6595 | + | |
| 6596 | + | |
| 6597 | + | |
| 6598 | + | |
| 6599 | + | |
| 6600 | + | |
| 6601 | + | |
| 6602 | + | |
| 6603 | + | |
| 6604 | + | |
| 6605 | + | |
| 6606 | + | |
6602 | 6607 | | |
6603 | 6608 | | |
6604 | 6609 | | |
| |||
6648 | 6653 | | |
6649 | 6654 | | |
6650 | 6655 | | |
6651 | | - | |
| 6656 | + | |
6652 | 6657 | | |
6653 | 6658 | | |
6654 | 6659 | | |
| |||
6740 | 6745 | | |
6741 | 6746 | | |
6742 | 6747 | | |
6743 | | - | |
| 6748 | + | |
6744 | 6749 | | |
6745 | | - | |
| 6750 | + | |
6746 | 6751 | | |
6747 | 6752 | | |
6748 | 6753 | | |
| |||
0 commit comments