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

On Windows we either get UTF-8 or colored output #900

Closed
agross opened this Issue Jul 3, 2016 · 6 comments

Comments

Projects
None yet
2 participants
@agross
Contributor

agross commented Jul 3, 2016

Hi,

I hope you are okay with the amount of issues I recently report. (Let me know if you're not.)

I'm running Windows and Linux in parallel. It seems that Nanoc on Windows cannot output UTF-8 and colors at the same time.

There are several shells/terminals available on my machine and there's also Nanoc's check for the win32console gem:

  • default Windows 10 terminal, e.g. conhost.exe + cmd.exe
  • ConEmu running zsh
Shell/Terminal ENV['LANG'] =~ /UTF-8/i win32console available colors enabled colors working UTF-8 enabled UTF-8 working As expected?
cmd.exe
cmd.exe
cmd.exe
cmd.exe
ConEmu
ConEmu
ConEmu
ConEmu

The most important part is the last column where the rows have ✘es. It seems as if win32console breaks UTF-8 output.

Interestingly, with Nanoc::CLI.setup_cleaning_streams commented, coloring + UTF-8 always works without requiring win32console to be available.

I think it's important to note that Microsoft did some work regarding the console in Windows 10. For example, on Windows 7 Ruby cannot print 'Loading site… ' correctly (it prints Loading site.) whereas on Windows 10 this is not an issue.

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Jul 4, 2016

Member

Thanks for the bug reports, first of all—they’re most definitely useful, as Nanoc keeps getting better.

I’m a bit at a loss at what to do about the issues on Windows, though. I don’t develop on Windows and don’t know enough about this OS in order to support it properly. I’d definitely welcome Windows-specific fixes, however!

Member

ddfreyne commented Jul 4, 2016

Thanks for the bug reports, first of all—they’re most definitely useful, as Nanoc keeps getting better.

I’m a bit at a loss at what to do about the issues on Windows, though. I don’t develop on Windows and don’t know enough about this OS in order to support it properly. I’d definitely welcome Windows-specific fixes, however!

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jul 4, 2016

Contributor

I’m a bit at a loss at what to do about the issues on Windows, though.

The question is if Nanoc wants to support older Windows versions in the future. I'd say if you drop the check for win32console we're fine if the user runs Windows 10 (UTF-8 + colors). Users of Windows 7 will see colors, but no UTF-8. I'd say colors are more important than pretty quotes w.r.t. to seeing what happens behind the scenes (files being created or updated).

Contributor

agross commented Jul 4, 2016

I’m a bit at a loss at what to do about the issues on Windows, though.

The question is if Nanoc wants to support older Windows versions in the future. I'd say if you drop the check for win32console we're fine if the user runs Windows 10 (UTF-8 + colors). Users of Windows 7 will see colors, but no UTF-8. I'd say colors are more important than pretty quotes w.r.t. to seeing what happens behind the scenes (files being created or updated).

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Jul 24, 2016

Member

I’ll remove the win32console support—it’s deprecated (see its README) in favour of ANSICON anyway.

Member

ddfreyne commented Jul 24, 2016

I’ll remove the win32console support—it’s deprecated (see its README) in favour of ANSICON anyway.

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jul 24, 2016

Contributor

Thanks! And with Windows 10 ANSICON won't even be required anymore :-)

Contributor

agross commented Jul 24, 2016

Thanks! And with Windows 10 ANSICON won't even be required anymore :-)

@ddfreyne ddfreyne closed this Jul 24, 2016

@ddfreyne

This comment has been minimized.

Show comment
Hide comment
@ddfreyne

ddfreyne Jul 24, 2016

Member

Oh, so I closed this ticket without fully verifying that it meets your requirements. Does removing win32console fix the issues you have? (I’d rather not spend much time on getting older versions of Windows to work, especially considering that there’s ANSICON.)

Member

ddfreyne commented Jul 24, 2016

Oh, so I closed this ticket without fully verifying that it meets your requirements. Does removing win32console fix the issues you have? (I’d rather not spend much time on getting older versions of Windows to work, especially considering that there’s ANSICON.)

@agross

This comment has been minimized.

Show comment
Hide comment
@agross

agross Jul 24, 2016

Contributor

Yes, everything is good to go :-)

+1 for not supporting older Windows versions

Contributor

agross commented Jul 24, 2016

Yes, everything is good to go :-)

+1 for not supporting older Windows versions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment