Transliteration error??

Posted on 2005-04-05
Medium Priority
Last Modified: 2012-05-07
I'm having problems with this form-email script that used to work before I changed ISPs??? I get an error of:

 Invalid range "þƒ¿¿¿¾€-3" in transliteration operator ...

on this line:

 $realname =~ tr# a-zA-Z0-9_\-,./'\200-377##dc;


sub cleanup_realname {
  my ($realname) = @_;

  return '' unless defined $realname;

  $realname =~ s#\s+# #g;

  if ($secure) {
    # Allow no unusual characters and impose a length limit. We
    # need to allow extended ASCII characters because they can
    # occur in non-English names.
    $realname =~ tr# a-zA-Z0-9_\-,./'\200-377##dc;
    $realname = substr $realname, 0, 128;
  } else {
    # Be as generous as possible without opening any known or
    # strongly suspected relaying holes.
    $realname =~ tr#()\\#{}/#;

  return $realname;
Question by:894359
  • 3
  • 2
LVL 18

Expert Comment

ID: 13712247
hey! I get the same:

$ perl
$realname =~ tr# a-zA-Z0-9_\-,./'\200-377##dc;
Invalid range "þ¿¿¿¾-3" in transliteration operator at - line 1.

Maybe you meant:

$realname =~ tr# a-zA-Z0-9_\-,./'\200-\377##dc;

Author Comment

ID: 13712466
No, that used to work the way it was??
LVL 18

Accepted Solution

kandura earned 2000 total points
ID: 13712499
Do you happen to know which version of perl your old ISP used, and which version your new ISP has?
I tried it in 5.8.4, and got the same error you did. I just tried it in 5.6.1, and got no error.

Author Comment

ID: 13712684
No, but I can find out! That probably is the problem! Makes sense!

Author Comment

ID: 13712826
You are correct!

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Email validation in proper way is  very important validation required in any web pages. This code is self explainable except that Regular Expression which I used for pattern matching. I originally published as a thread on my website : http://www…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans
Suggested Courses

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question