mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-07 06:32:44 +08:00
Fixed: WIN10 powershell output encoding bug
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
"lowdb": "^1.0.0",
|
||||
"md5": "^2.2.1",
|
||||
"melody.css": "^1.0.2",
|
||||
"picgo": "^1.2.6",
|
||||
"picgo": "^1.2.8",
|
||||
"qiniu": "^7.1.1",
|
||||
"vue": "^2.3.3",
|
||||
"vue-electron": "^1.0.6",
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
# Adapted from https://github.com/octan3/img-clipboard-dump/blob/master/dump-clipboard-png.ps1
|
||||
param($imagePath)
|
||||
|
||||
# Adapted from https://github.com/octan3/img-clipboard-dump/blob/master/dump-clipboard-png.ps1
|
||||
# https://github.com/PowerShell/PowerShell/issues/7233
|
||||
# fix the output encoding bug
|
||||
[console]::InputEncoding = [console]::OutputEncoding = New-Object System.Text.UTF8Encoding
|
||||
|
||||
Add-Type -Assembly PresentationCore
|
||||
function main {
|
||||
@@ -27,13 +30,15 @@ function main {
|
||||
}
|
||||
|
||||
try {
|
||||
$file = Get-Clipboard -Format FileDropList
|
||||
if ($file -ne $null) {
|
||||
Convert-Path $file
|
||||
Exit 1
|
||||
}
|
||||
# For WIN10
|
||||
$file = Get-Clipboard -Format FileDropList
|
||||
if ($file -ne $null) {
|
||||
Convert-Path $file
|
||||
Exit 1
|
||||
}
|
||||
} catch {
|
||||
main
|
||||
# For WIN7 WIN8 WIN10
|
||||
main
|
||||
}
|
||||
|
||||
main
|
||||
@@ -6765,9 +6765,9 @@ performance-now@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
|
||||
|
||||
picgo@^1.2.6:
|
||||
version "1.2.7"
|
||||
resolved "http://registry.npm.taobao.org/picgo/download/picgo-1.2.7.tgz#f14a7cdad11eb30b2bfc0cb6045771015922c764"
|
||||
picgo@^1.2.8:
|
||||
version "1.2.8"
|
||||
resolved "http://registry.npm.taobao.org/picgo/download/picgo-1.2.8.tgz#c65a2f680820cd1d5382a37b5522e0bb1004b765"
|
||||
dependencies:
|
||||
chalk "^2.4.1"
|
||||
commander "^2.17.0"
|
||||
|
||||
Reference in New Issue
Block a user