Skip to content

Instantly share code, notes, and snippets.

@yuanliwei
Created February 25, 2016 05:41
Show Gist options
  • Save yuanliwei/0768fb875348b66cdc73 to your computer and use it in GitHub Desktop.
Save yuanliwei/0768fb875348b66cdc73 to your computer and use it in GitHub Desktop.
npm install 乱码解决方案

npm install 乱码解决方案

  • chcp切换cmd页码为65001 chcp 65001

npm/npm#10648

Seems that the character count of the progress bar is calculated to fill in just one line, then when the next line is outputed, last line is erased so the viewer see a growing progress bar But in Chinese code pages, the characters used by the bar are full width (regular ascii characters are "half width") , which means they take up the space of 2 characters (this can be seen obviously in the first picture I posted here), and as a result the progress bar output to 2 lines, and broke itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment