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