Open bonskijr opened 6 years ago
Hi, I am not able to repro this on Win10 Powershell 5.1 Can you tell me what codepage you are using for the powershell terminal?
The original codepage was 437 (US)
Then after running the cli changed to 65001 (UTF-8)
But as you can see both have the issue, at least for me
Thanks I'll need to investigate this. I can't seem to repro this on 2 of our machines using version 0.8.0. I noticed that you still have version 0.7.0. Try doing a pip install --upgrade mssql-cli
Eventhough I think we didn't make any major changes just try upgrading and see if the problem persists. I'll try to get a repro so I can investigate this on my end.
Hi @abhisheksinha89 ,
I tried upgrading but issue still persist, but thanks for looking into this.
I having the issue also and using 65001(UTF-8) code page is there a fix in sight. using windows 10 and powershell shell also occurs on cmd shell.
But if I use the cmd shell in legacy mode works fine
hope this helps
I was able to repro this issue even with a simple prompt from prompt tool kit. Could potentially be a renderer issue. Will keep digging and update here.
@bonskijr @snewfie , I wasn't able to pinpoint a exact issue from the source. It looks like it could be a font issue with decoding the transparent characters within the prompt toolkit. I was able to fix this issue by switching my font (Lucida Console) for Powershell to some other font (Raster fonts) which removed the rectangular characters. I also verified switching the new font back to the original font did not return the rectangles.
It could have been a font mismatch in the mapping where the OS wasn't font substituting properly.
TL;DR
Using legacy console:
Not using legacy console:
Either way, let me know if this resolved your issue. If the issue persists, I can dig further.
Thanks!
This looks like a prompt_toolkit issue indeed. I can reproduce it with the example prompt applications.
Which Python version are you using? I don't remember that we were changing the code page, but I think Python 3.6 does. In any case, I think we can probably fix it.
Also notice that prompt_toolkit 2.0 (non yet released), can render using vt100 escape sequences on Windows 10, which is also more efficient.
hi @jonathanslenders , running Python 2.7.1 so I can tinker with Sql op studio source(requirement).
But I'm not sure what I installed or applied but it looks ok to me now
@bonskijr , did you happen to change your font or python version since the first time you reported the issue? Does it still repro if you use 3.6?
changing the font fixes the issue wihout needing to use legacy mode
used consolas
thx for all the input guys
@MrMeemus no changes in font, default was Consolas ( see first screenshots ).
I think its probably related to codepage, at first cmd/ps, my codepage s 437 and upon exit from mssql-cli changes to 65001
note: not sure why this changed to v.0.9 of mssq-cli, probably because I also have the source downloaded?
Closing this issue with the troubleshooting steps in place merged above.
Let's leave this issue open as it still exists, we just have a workaround.
mssql-cli displays differently when being used inPowershell console. In command prompt it displays as it should but in Powershell it display filler "rectangle" for spaces.
Poweshell
Command Prompt
mssql-cli v 0.7 .0 OS: Windows 10.0.15063 PowerShell : 5.1.15063.726