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

Windows fixes #198

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Windows fixes #198

wants to merge 3 commits into from

Conversation

vguna
Copy link
Contributor

@vguna vguna commented Aug 7, 2016

What does it do ?

Exporting german filenames (UTF8) that contain umlauts (öäüß) gets messed up when writing
the files under windows. PHP5 under Windows does not support UTF8.

Also I encountered during my build/extract cycles, that there's a conversion of CR/LF in the gitify
code, that results in changed files after a build/extract - although nothing has changed. This is
inconvenient when comparing against SCM (shows the files modified),

Why is it needed ?

When exporting filenames, these are not correctly named under windows and are recognized as "new" when diffing against e.g. the SCM.

Related issue(s)/PR(s)

No PR yet. WDYT?

@Mark-H
Copy link
Member

Mark-H commented Aug 7, 2016

There are some related issues, like #167 and #50, so I think it makes sense to take a closer look at filename generation and line endings across all environments, not just windows.

@vguna
Copy link
Contributor Author

vguna commented Aug 7, 2016

Yes. Maybe having some kind of char whitelist for exporting/importing files would make sense. As long as the "real" filenames within modx aren't affected by that. As I read today, linux has no problem with utf8 filenames, but windows has. AFAIK PHP7 comes with UTF8 windows support. But I think not everyone is able to switch to 7 in the near future. So I agree this PR is more a temporary solution so I can get it to run under windows - now :).

Regarding CR/LF it isn't actually related to windows. I think gitify itself shouldn't change lineendings of content files at all. IMHO it should treat them as "binary" files.

@alroniks
Copy link
Collaborator

I agree about encoding filenames but disagree about file endings. By PSR all files should have \n symbol and almost all IDE adds this chars at the end of lines. I not sure but maybe as a solution, we can replace line ends by PHP_EOF constant (should get correct line end character from the system)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants