()
| 651 | from _locale import getencoding |
| 652 | except ImportError: |
| 653 | def getencoding(): |
| 654 | if hasattr(sys, 'getandroidapilevel'): |
| 655 | # On Android langinfo.h and CODESET are missing, and UTF-8 is |
| 656 | # always used in mbstowcs() and wcstombs(). |
| 657 | return 'utf-8' |
| 658 | encoding = getdefaultlocale()[1] |
| 659 | if encoding is None: |
| 660 | # LANG not set, default to UTF-8 |
| 661 | encoding = 'utf-8' |
| 662 | return encoding |
| 663 | |
| 664 | try: |
| 665 | CODESET |
no test coverage detected