?
Solved

Transliteration error??

Posted on 2005-04-05
5
Medium Priority
?
261 Views
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;
}
0
Comment
Question by:894359
  • 3
  • 2
5 Comments
 
LVL 18

Expert Comment

by:kandura
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;
0
 

Author Comment

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

Accepted Solution

by:
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.
0
 

Author Comment

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

Author Comment

by:894359
ID: 13712826
You are correct!
0

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