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

Implement %encoding directive #81

Merged
merged 3 commits into from
Jan 7, 2016
Merged

Implement %encoding directive #81

merged 3 commits into from
Jan 7, 2016

Conversation

hvr
Copy link
Member

@hvr hvr commented Dec 29, 2015

This addresses the motivating use-case behind #66 by implementing a new
directive which is inspired by the existing %wrapper directive. The
encoding string is matched case insensitive. Supported examples:

%encoding "utf-8"
%encoding "iso-8859-1"
%encoding "UTF8"
%encoding "Latin1"

Moreover, some logic has been added to abort if the combination of CLI
--latin1 flags and %encoding directives contradict each other. For
instance, setting --latin1 on the command-line while requesting
%encoding "utf8" in the Alex script causes Alex to abort with an error.

This addresses the motivating use-case behind haskell#66 by implementing a new
directive which is inspired by the existing %wrapper directive. The
encoding string is matched case insensitive. Supported examples:

   %encoding "utf-8"
   %encoding "iso-8859-1"
   %encoding "UTF8"
   %encoding "Latin1"

Moreover, some logic has been added to abort if the combination of CLI
`--latin1` flags and %encoding directives contradict each other. For
instance, setting `--latin1` on the command-line while requesting
`%encoding "utf8"` in the Alex script causes Alex to abort with an error.
simonmar added a commit that referenced this pull request Jan 7, 2016
Implement %encoding directive
@simonmar simonmar merged commit 98fe2ca into haskell:master Jan 7, 2016
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.

2 participants