Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accentuation in project path is not supported (Windows) #60

Closed
andrenasturas opened this issue Oct 3, 2018 · 1 comment
Closed

Accentuation in project path is not supported (Windows) #60

andrenasturas opened this issue Oct 3, 2018 · 1 comment
Assignees
Labels
Milestone

Comments

@andrenasturas
Copy link

The plug-in is unable to work correctly if the current folder opened in vscode is located in a folder containing accentuation.

I work on a computer where usernames are the exact real names of users. Mine have an French accent the issue appears for any repo cloned inside my Windows home directory. It works well in other accentuation-free places.

When I hit the Refresh button, I get this message : Hg: spawn C:\Program Files\TortoiseHg\hg.exe ENOENT
When I try to pull the repo, I get this message : Your repository has no paths configured to pull from. When I hit the button "Open hgrc file" in the error message popup, I get this new message : Hg: ENOENT: no such file or directory, open 'c:\...\...� ...\...\.hg\hgrc'.

When I saw the � character instead of the expected é, I understood the issue was related to accentuation.

I don't know if it is specific to this plug-in or if it concerns vscode itself, but I don't remember ever having trouble with git repos.

I was also unable to reproduce on a Ubuntu-based system.

@hdpoliveira
Copy link
Collaborator

Hi @andrenasturas ,

This is a limitation on Mercurial itself. From https://www.mercurial-scm.org/wiki/EncodingStrategy:

There are two incompatible strategies to approach this problem and no middle ground. Therefore, Mercurial has intentionally chosen a strategy that works well for some tools (mostly Unix ones) and works less well for others (mostly Windows ones).

I just installed Mercurial on my Windows in Portuguese, and it shows:

> hg
Sistema de controle de versÒo distribuÝdo Mercurial

comandos bßsicos:

 add           adiciona os arquivos especificados na pr¾xima consolidaþÒo
 annotate      mostra informaþÒo de revisÒo por linha para cada arquivo
 clone         cria uma c¾pia de um reposit¾rio existente
 commit        consolida os arquivos pedidos ou todas as mudanþas por gravar
 diff          exibe um diff do reposit¾rio (ou arquivos selecionados)
 export        exibe o cabeþalho e diffs para uma ou mais revis§es
 forget        esquece os arquivos especificados na pr¾xima consolidaþÒo
 init          cria um novo reposit¾rio no diret¾rio pedido
 log           mostra o hist¾rico de revis§es do reposit¾rio ou de arquivos
 merge         mescla uma outra revisÒo com o diret¾rio de trabalho
 pull          traz mudanþas da origem especificada
 push          envia mudanþas para o destino especificado
 remove        remove os arquivos pedidos na pr¾xima consolidaþÒo
 serve         inicia um servidor web auto-suficiente
 status        exibe arquivos alterados no diret¾rio de trabalho
 summary       sumariza o estado do diret¾rio de trabalho
 update        atualiza o diret¾rio de trabalho (ou muda para outra revisÒo)

(use 'hg help' para a lista completa de comandos ou 'hg -v' para detalhes)

You can see there are a bunch of weird characters in the text ☹️

There is probably some place in the extension's code we are trying to do some encoding, and is getting things wrong.

hdpoliveira added a commit to hdpoliveira/vscode-hg that referenced this issue Jun 21, 2020
hdpoliveira added a commit to hdpoliveira/vscode-hg that referenced this issue Jun 26, 2020
@hdpoliveira hdpoliveira self-assigned this Jun 27, 2020
incidentist added a commit that referenced this issue Jun 29, 2020
Fix #60: Use proper encoding on Windows
@incidentist incidentist added this to the 1.6.0 milestone Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants