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

Allow lowercase environment variables in UTF-8 check #338

merged 2 commits into from Oct 3, 2013


None yet
3 participants
Copy link

ddfreyne commented Oct 2, 2013

This makes the nanoc CLI recognise UTF-8 support in the terminal as available when LC_ALL, LC_CTYPE or LANG contain the lowercase utf instead of only the uppercase UTF.

Fixes #335.


This comment has been minimized.

Copy link

mdekstrand commented Oct 2, 2013

I'm not a Ruby programmer, but this looks like it will fix it. 👍

@@ -184,7 +184,7 @@ def self.setup_cleaning_streams
def self.enable_utf8?(io)
return true if !io.tty?

%w( LC_ALL LC_CTYPE LANG ).any? { |e| ENV[e] =~ /UTF/ }
%w( LC_ALL LC_CTYPE LANG ).any? { |e| ENV[e] =~ /UTF/i }

This comment has been minimized.


bobthecow Oct 3, 2013


do we have to worry about utf16 and other dumb things like that?

This comment has been minimized.


ddfreyne Oct 3, 2013

Author Member


ddfreyne added a commit that referenced this pull request Oct 3, 2013

Merge pull request #338 from nanoc/bug/case-insensitive-utf-8-check
Allow lowercase environment variables in UTF-8 check

@ddfreyne ddfreyne merged commit 4f1b35c into release-3.6.x Oct 3, 2013

@ddfreyne ddfreyne deleted the bug/case-insensitive-utf-8-check branch Oct 3, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.