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

Fix unicode to latin-1 translation. #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hakonhagland
Copy link

The UC (unicode to Latin-1) option for the tr// operator (see perldoc for perl 5.6 was removed in perl 5.7.0 (see perl570delta. It is not possible to include the statement conditional based on $] either, e.g. if $] is less than 5.008, since the code will anyway not compile on newer versions of perl (giving a syntax error).

I suggest to drop support for perl version 5.7 and below by removing the transliteration (I think it is no longer correct to translate to unicode to latin-1 like that).

Note: I was not able to test if this fix works since I could not connect to the server. I get:

$ perl portuguese.pl
Connecting to natura.di.uminho.pt ...
Could not connect: Connection refused at portuguese.pl line 39.

Note: This PR is part of assignment from pullrequest.club. See also this answer on stackoverflow.

The UC (unicode to Latin-1) option for the tr// operator was removed in
perl 5.7. It is not possible to include the check conditionally if $] is
e.g. less than 5.008 either since the code will not compile on newer
versions of perl. I suggest we drop support for perl version 5.7 and
below by removing the check.
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.

1 participant