red / VScode-extension

Red extension for Visual Studio Code
Boost Software License 1.0
40 stars 17 forks source link

Shortcut command errors. #15

Open JiaChen-Zeng opened 7 years ago

JiaChen-Zeng commented 7 years ago

Interpret(F6):

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Users\某用户> cd ":\某用户\Desktop"
cd : パス 'C:\Users\某用户\:\某用户\Desktop' が存在しないため検出できません。
発生場所 行:1 文字:1
+ cd ":\某用户\Desktop"
+ ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\某用户\:\某用户\Desktop:String) [Set-Location], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.SetLocationCommand

PS C:\Users\某用户> D:/某用户/Links/Shortcuts/Red.exe --cli d:\某用户\Desktop\test.red

Compile(F7):

Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Users\某用户> cd "d:\某用户\Desktop"
PS D:\某用户\Desktop> D:/某用户/Links/Shortcuts/Red.exe -c d:\某用户\Desktop\test.red
Cannot access source file: d:\菴ウ螳ク\Desktop\test.red
JiaChen-Zeng commented 7 years ago

The compilation error still occurs when I manually compile using cmd, so this one is not the extension's bug.

ghost commented 7 years ago

The first one, I think, is the same as https://github.com/red/VScode-extension/issues/6 , which has been fixed and is available on master branch (probably not yet released as an update, so you would have to use it manually).

The compilation error still occurs when I manually compile using cmd, so this one is not the extension's bug.

I think Red does not support chinese characters in path, so IMO you should open a bug report on the main red/red repo if not done already.

hyzwhu commented 6 years ago

I have tried to set red path which contains the chinese characters on windows, it worked , so this should be not a bug. @qtxie

ghost commented 6 years ago

This seems to be because rebol does not support unicode/chinese properly. Once red is rewritten in red, then this should work.

Demo - I created a folder using some chinese characters I picked up from this issue, and then - Rebol -

>> probe system/options/path
%/C/Users/alpha/Desktop/???/

Red -

>> probe system/options/path
%/C/Users/alpha/Desktop/某用户/

Note that rebol displays chinese as question marks.

Also - Rebol -

>> do %t.r
** Access Error: Cannot open /C/Users/alpha/Desktop/???/t.r
** Where: halt-view
** Near: do %t.r

Red -

>> do %t.red                              <-- This works fine.