小编gee*_*972的帖子

powershell core 7.1.2 或 7.2 中带重音的法语字符不起作用

在 powershell 核心(7.1.2)或 7.2 上,我没有带重音的法语字符“\xc3\xa9”或“\xc3\xa8”或“\xc3\xa0”,我有这个:

\n

\xc3\x83\xc2\xa0 日\xc3\x83\xc2\xa9j\xc3\x83\xc2\xa0 安装\xc3\x83\xc2\xa9es 和 derni\xc3\x83\xc2\xa8 的使用列表\xc3\x83\xc2\xa0 日

\n

它适用于 powershell windows 5.1。文字是这样的:

\n

列出 \xc3\xa0 日内\xc3\xa9j\xc3\xa0 install\xc3\xa9es 和 derni\xc3\xa8re mise \xc3\xa0 日的情况列表

\n

我在这两种情况下使用 IDE Visual Studio 代码。

\n

请问解决方案是什么?\n我已经尝试更改编码:utf8 或 utf 16,例如使用法语语言包

\n

例如,我尝试了这段代码,但它不起作用

\n
#affiche la tentative de mise \xc3\xa0 jour"\nfunction affichetentative {\n \n    #nom du serveur\n    $b=HOSTNAME.EXE\n    #chemin  o\xc3\xb9  est lecalis\xc3\xa9 le fichier de log du serveur\n    $path="C:\\LOGS\\log_$b.txt"\n    #affichage du texte ci-dessous dans un fichier de log\n    $c=Get-Date\n    $a="Liste des mises …
Run Code Online (Sandbox Code Playgroud)

powershell

4
推荐指数
1
解决办法
4134
查看次数

返回带有承诺的布尔值

这是我的代码:

const executorFunction = (解决, 拒绝) => {

<script>
      
if (  1==1){

    resolve(true);
   
}
else{
    resolve(false);
}

    }




const myFirstPromise = new Promise(executorFunction);


console.log(myFirstPromise);


        </script>
Run Code Online (Sandbox Code Playgroud)

这是我的代码的输出:

Promise {<fulfilled>: true}
[[Prototype]]: Promise
[[PromiseState]]: "fulfilled"
[[PromiseResult]]: true
Run Code Online (Sandbox Code Playgroud)

我想要变量 myFirstPromise 中的布尔值 true

我想要这个输出:

true
Run Code Online (Sandbox Code Playgroud)

请问解决办法是什么?

javascript node.js

0
推荐指数
1
解决办法
2148
查看次数

标签 统计

javascript ×1

node.js ×1

powershell ×1