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

Fix examples/downloads/files/utf-8 한中日.txt #2393

Closed
Fishrock123 opened this issue Oct 11, 2014 · 15 comments
Closed

Fix examples/downloads/files/utf-8 한中日.txt #2393

Fishrock123 opened this issue Oct 11, 2014 · 15 comments
Assignees
Labels

Comments

@Fishrock123
Copy link
Contributor

@dougwilson can we please fix this? It produces changes on my system without me doing anything..

screen shot 2014-10-11 at 1 32 24 pm

@dougwilson
Copy link
Contributor

Fix it how? I have never seen anyone else have that issue. Perhaps it us a bug in whatever that GUI you are using? Do you have a recommendation that won't remove the necessary test?

@Fishrock123
Copy link
Contributor Author

Also happens in my CLI

screen shot 2014-10-11 at 2 47 17 pm

I'm pretty sure the path to that file is invalid on my system somehow.
(OS X 10.9.5)

@dougwilson
Copy link
Contributor

Gotcha. I don't have OS X to try, but I think that files was actually contributed by a OS X user and I'm sure most PRs are from OS X users who haven't complained. Perhaps it's just the version of git you have installed? IDK, man :)

@Fishrock123
Copy link
Contributor Author

git version 1.9.3 (Apple Git-50)

@dougwilson
Copy link
Contributor

In the end, I can probably just delete that file in the next minor express version when I change express to use the content-disposition module.

@Fishrock123
Copy link
Contributor Author

👍

@meteormatt
Copy link
Contributor

Maybe this issue is created by me, I will check it later.

@dougwilson
Copy link
Contributor

@Fishrock123 can you tell me if running this:

$ git config --global core.precomposeunicode true

and deleting and re-cloning the repo fixes the issue for you?

@andrewrk
Copy link
Member

We had a similar issue over here: thejoshwolfe/yauzl#10

What it comes down to is:

  • OS X file system is stupid, it can't be trusted with non-ascii characters.
  • Don't have non-ascii filenames checked in to git.

@dougwilson
Copy link
Contributor

@andrewrk :( I knew it was from HFS+ and how it forces a specific Unicode normalization. @Fishrock123 did you ever get a chance to try that setting?

@Fishrock123
Copy link
Contributor Author

Not yet, will try today.

@Fishrock123
Copy link
Contributor Author

@dougwilson that does not appear to have any effect.

@dougwilson
Copy link
Contributor

OK. I just wanted to confirm :) I'm going to just remove that whole example or something.

@andrewrk
Copy link
Member

In yauzl we solved it by adding a small mapping thing to the test framework: https://github.com/thejoshwolfe/yauzl/blob/2804fdaec5146c25222778a7d80981e9ccc4e705/test/test.js#L181

So, change the filename to ascii, but in your tests, add a small mapping thing that translates the ascii into the correct string with unicode. When you open the file, use the real path, but when you test against the filename, use the one post-mapping.

@dougwilson
Copy link
Contributor

The file isn't actually used in tests, though I thought it was at first; it's just used as an example of res.download functionality.

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