Open kacomsrd opened 2 years ago
Some more information:
I tried the above in both git bash and powershell (windows terminal).
chcp
shows codepage 932
I tried again after executing chcp 65001
but the problem persists.
Update:
The trying to parse the output of the following command triggers the error.
az rest -m get -u https://graph.microsoft.com/v1.0/directoryRoles/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/members --headers "Content-Type=application/json"
Looking at the output, everything that is supposed to be Japanese is garbled.
Update:
It seems to work after setting
Control Panel > Region > Administrative > Change system local -> 'Beta: Use Unicode UTF-8 for worldwide language support'
but I feel this should not be the solution.
The Japanese love their legacy Shift-JIS only apps and I have no idea what side-effects this setting has.
The commands to manipulate azure are run via child_process command line (like you tried directly) and the result is a json string that is being parse with JSON.parse(response). When you change the system setting that changes the result coming from the command line to be readable. If there was a way to know what encoding the response was and then convert it before sending it to the json parser we could take care of this . . . but I'm not sure how to determine the response encoding or to translate it to utf8.
Looks like it might be possible to fix this by using "cmd /c chcp 65001>nul && " as a prefix to the azure command being run on Win32.
Expected behavior
npm run configure-sso
works.Current behavior
Using Yeoman and generator-office I scaffold an Office addin
Calling
npm run configure-sso
yields the following:Steps to Reproduce
Please provide detailed steps for reproducing the issue.
npm run configure-soo
Context
I am assuming that this error occurs while checking if I am a tenant admin. It looks to me like an encoding problem. I am not sure what "displayName" the error above refers to, but I assume it is my name from AAD. That name contains Japanese characters (Katakana).