Uploaded image for project: 'Nuxeo Drive '
  1. Nuxeo Drive
  2. NXDRIVE-1567

Use UTF-8 as encoding when dumping a database

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1.0
    • Fix Version/s: 4.1.0
    • Component/s: Framework

      Description

      We was thinking the default encoding was UTF-8, but apparently when Drive is packaged, this is not the case.

      We encounter this issue on macOS:

      UnicodeEncodeError: 'ascii' codec can't encode character '\u201e' in position 106: ordinal not in range(128)
        File "nxdrive/engine/dao/sqlite.py", line 189, in save_backup
        File "nxdrive/engine/dao/utils.py", line 165, in save_backup
        File "nxdrive/engine/dao/utils.py", line 36, in dump
      

      And the same kind on Windows:

      UnicodeEncodeError: 'charmap' codec can't encode character '\u261d' in position 220: character maps to <undefined>
        File "nxdrive\engine\dao\sqlite.py", line 189, in save_backup
        File "nxdrive\engine\dao\utils.py", line 165, in save_backup
        File "nxdrive\engine\dao\utils.py", line 36, in dump
        File "C:\Python36-32\lib\encodings\cp1252.py", line 19, in encode
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m