Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • C csvkit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 61
    • Issues 61
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • wireservice
  • csvkit
  • Merge requests
  • !359

fix encoding issue for chinese(Non-English) Column passed from commandli...

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed Administrator requested to merge github/fork/n3xtchen/master into master Nov 07, 2014
  • Overview 0
  • Commits 1
  • Pipelines 0
  • Changes 3

Created by: n3xtchen

if u pass the chinese column to csvcut -c (It also affect csvgrep, csvsort, csvjoin,...), It will cause the proble as followed,because It can't process input encoding from command,

$ in2csv userinfos20140819.xls 
id,<中文1>,<中文2>
1,1212,88
1,1111,89
$ in2csv userinfos20140819.xls csvcut -c <中文1>,<中文2>
.....
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe5 in position 19: ordinal not in range(128)
Original exception was:
.....
    raise ColumnIdentifierError('Column identifier "%s" is neither an integer, nor a existing column\'s name.' % c)
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/n3xtchen/master