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

Don't force C.UTF-8 when locale is UTF-8 already #22

Merged
merged 1 commit into from
Jun 16, 2019
Merged

Don't force C.UTF-8 when locale is UTF-8 already #22

merged 1 commit into from
Jun 16, 2019

Conversation

mtvrsh
Copy link

@mtvrsh mtvrsh commented Mar 21, 2019

closes #21

Copy link

@Maxr1998 Maxr1998 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly looks good to me, though some braces could be added for better code style.

setlocale(LC_ALL, LANG);
else
setlocale(LC_ALL, "C.UTF-8");
} else
setlocale(LC_ALL, "");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
setlocale(LC_ALL, "");
setlocale(LC_ALL, "");
}

lolcat.c Outdated
setlocale(LC_ALL, LANG);
else
setlocale(LC_ALL, "C.UTF-8");
} else

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
} else
} else {

@mtvrsh
Copy link
Author

mtvrsh commented Mar 22, 2019

I thought a little about this change and it is just setting what is already set. I'll try again today.

@mtvrsh mtvrsh changed the title If possible set locale to $LANG instead of C.UTF-8 Don't force C.UTF-8 when locale is UTF-8 already Mar 23, 2019
@jaseg jaseg merged commit fa63a35 into jaseg:master Jun 16, 2019
@mtvrsh mtvrsh deleted the locale branch June 17, 2019 07:00
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.

Some characters break the output of lolcat (stops before that certain char)
3 participants