You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Garry De Toffoli <ga...@telemar.it> on 2001/03/06 15:08:07 UTC

Encode like HTMLEncode

Hi to all;

    someone know a method like HTMLEncode in ASP?

    This method would transform charachters like blank (0x20) or all the character over the 127th ascii code in the corrisponding exadecimal value;

    for example, I have a string containing these sequence: "für";
    this would be encoded like this: "f%fcr", where %fc is the exadecimal rappresentation of the char "ü";
    Thank you very much.


R: Encode like HTMLEncode

Posted by Garry De Toffoli <ga...@telemar.it>.
Found; it is the encode in java.net.URLEncoder

sorry for my question.

Bye.
  ----- Original Message ----- 
  From: Garry De Toffoli 
  To: tomcat-user@jakarta.apache.org 
  Sent: Tuesday, March 06, 2001 3:08 PM
  Subject: Encode like HTMLEncode


  Hi to all;

      someone know a method like HTMLEncode in ASP?

      This method would transform charachters like blank (0x20) or all the character over the 127th ascii code in the corrisponding exadecimal value;

      for example, I have a string containing these sequence: "für";
      this would be encoded like this: "f%fcr", where %fc is the exadecimal rappresentation of the char "ü";
      Thank you very much.


RE: Encode like HTMLEncode

Posted by Craig O'Brien <cr...@thebridgeproductions.com>.
Try

String variable = URLEncoder.encode(yourString);

Craig



-----Original Message-----
From: Garry De Toffoli [mailto:garry@telemar.it]
Sent: Tuesday, March 06, 2001 6:08 AM
To: tomcat-user@jakarta.apache.org
Subject: Encode like HTMLEncode


Hi to all;

    someone know a method like HTMLEncode in ASP?

    This method would transform charachters like blank (0x20) or all the
character over the 127th ascii code in the corrisponding exadecimal value;

    for example, I have a string containing these sequence: "für";
    this would be encoded like this: "f%fcr", where %fc is the exadecimal
rappresentation of the char "ü";
    Thank you very much.