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

Encfsctl handles nordic characters incorrectly #79

Open
NiklasThunvik opened this issue Feb 16, 2017 · 4 comments
Open

Encfsctl handles nordic characters incorrectly #79

NiklasThunvik opened this issue Feb 16, 2017 · 4 comments
Assignees
Labels

Comments

@NiklasThunvik
Copy link

Environment

  • Windows version: Windows 7
  • Processor architecture: x64
  • Encfs4win version: 1.10.1-RC10
  • Dokan version (legacy, modern): modern

Description

When trying to encode/decode paths with nordic characters they get mangled by encfsctl. They do work when mounting using encfs though.

Expected behavior vs. actual behavior

encfs and encfsctl should encode paths in the same way. Now they don't.

Mounted drive encodes path "/ÅÄÖ" as "3my7AtPXTpUFz6HqAn-1zESJ".
Trying to encode the same path using encfsctl returns "X6F60-PunHHH0CUQ5Onw906Z"

Using encfsctl to decode "3my7AtPXTpUFz6HqAn-1zESJ" returns "ÅÄÖ"
Using encfsctl to decode the path returned by itself "X6F60-PunHHH0CUQ5Onw906Z" returns "┼─Í"

Steps to reproduce problem

  1. Mount a drive
  2. Create a folder named "ÅÄÖ"
  3. Take the encoded name and try to decode it using encfsctl
    OR
  4. Try to encode the same path using encfsctl and the encoded paths should match.

Relevant logs

Attach any relevant log files that can help to debug your issue (be sure to use the -v option for verbose logs).

@jetwhiz
Copy link
Owner

jetwhiz commented Mar 2, 2017

Hi @NiklasThunvik -- thanks for the bug report!

Is this issue specific to encfsctl, or does it also exist in encfs?

@NiklasThunvik
Copy link
Author

It seems to be specific to encfstl. Encfs behaves correctly.

@jetwhiz
Copy link
Owner

jetwhiz commented Mar 3, 2017

It might be as simple as adding "SetConsoleCP(65001);" to set the console to uft-8 here: https://github.com/jetwhiz/encfs4win/blob/master/encfs/encfsctl.cpp#L756

int main(int argc, char **argv) {
  SetConsoleCP(65001);
  
  encfs::init_mpool_mutex();
  
  START_EASYLOGGINGPP(argc, argv);
  encfs::initLogging();

We'll have to see how this impacts decode and encode though. Can you see if this fixes your issue?

@jetwhiz jetwhiz added this to TODO in v1.11.0 Release Sep 10, 2017
@stale
Copy link

stale bot commented May 4, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label May 4, 2019
@stale stale bot closed this as completed May 11, 2019
@jetwhiz jetwhiz reopened this Jul 27, 2019
@stale stale bot removed the wontfix label Jul 27, 2019
@jetwhiz jetwhiz self-assigned this Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants