Loading ...
Sorry, an error occurred while loading the content.

Unicode Conversion

Expand Messages
  • Pankaj Chaturvedi
    Hi, I am a newbie in Perl. Does anybody seems an error in my following snippet. I am regularly getting the compilation error in it. $char_lpar = x{00028} ;
    Message 1 of 1 , May 20 1:13 AM
    • 0 Attachment
      Hi,

      I am a newbie in Perl. Does anybody seems an error in my following snippet.
      I am regularly getting the compilation error in it.

      $char_lpar = "\x{00028}";
      $char_rpar = "\x{00029}";

      my $decval_1 = ord $char_lpar;
      my $decval_2 = ord $char_rpar;

      $data =~ s/$char_lpar/sprintf("&#x%.4x;", $decval_1)/ge;
      $data =~ s/$char_rpar/sprintf("&#x%.4x;", $decval_2)/ge;

      Best,

      Pankaj Chaturvedi

      ============================================================================
      ================




      Confidentiality Notice:" This message and any attachment(s)
      contained here are information that is confidential, proprietary to
      IDS Infotech Ltd. and its customers.
      Contents may be privileged or otherwise protected by law. The
      information is solely intended for the individual or the entity it
      is addressed to. If you are not the intended recipient of this
      message, you are not authorized to read, forward, print, retain,
      copy or disseminate this message or any part of it. If you have
      received this e-mail in error, please notify the sender immediately
      by return e-mail and delete it from your computer."

      [Non-text portions of this message have been removed]
    Your message has been successfully submitted and would be delivered to recipients shortly.