Professional Web Applications Themes

Text encoding reversal. - PERL Beginners

Quick version: Can anyone tell me what the text encoding is called that this filename is in? Siham%2C%20Garden.png Longer version: I've got a minor snag in my conversion program: XML::Pr is encoding the attributes it returns to me. This isn't a problem in most cases, but there is one case where I need to use that attribute value in a shell call, and I can't figure out a good way to de-convert it. I know the encoding (well, mostly), but I don't know what it is called, so I can't find a converter. (I don't want to write one myself, ...

  1. #1

    Default Text encoding reversal.


    Quick version:
    Can anyone tell me what the text encoding is called that this
    filename is in?
    Siham%2C%20Garden.png

    Longer version:
    I've got a minor snag in my conversion program: XML::Pr is
    encoding the attributes it returns to me. This isn't a problem in
    most cases, but there is one case where I need to use that attribute
    value in a shell call, and I can't figure out a good way to
    de-convert it. I know the encoding (well, mostly), but I don't know
    what it is called, so I can't find a converter. (I don't want to
    write one myself, I'm sure I'd miss some character. Besides, it is a
    common encoding, right?)

    Any pointers towards relevant modules would be appreciated. I just
    can't figure out a good search for them.

    Daniel T. Staal

    ---------------------------------------------------------------
    This email copyright the author. Unless otherwise noted, you
    are expressly allowed to retransmit, quote, or otherwise use
    the contents for non-commercial purposes. This copyright will
    expire 5 years after the author's death, or in 30 years,
    whichever is longer, unless such a period is in excess of
    local copyright law.
    ---------------------------------------------------------------
    Daniel Staal Guest

  2. #2

    Default Re: Text encoding reversal.

    Daniel Staal wrote:
    >
    > Quick version:
    > Can anyone tell me what the text encoding is called that this filename
    > is in?
    > Siham%2C%20Garden.png
    >
    > Longer version:
    > I've got a minor snag in my conversion program: XML::Pr is encoding
    > the attributes it returns to me. This isn't a problem in most cases,
    > but there is one case where I need to use that attribute value in a
    > shell call, and I can't figure out a good way to de-convert it. I know
    > the encoding (well, mostly), but I don't know what it is called, so I
    > can't find a converter. (I don't want to write one myself, I'm sure I'd
    > miss some character. Besides, it is a common encoding, right?)
    >
    > Any pointers towards relevant modules would be appreciated. I just
    > can't figure out a good search for them.
    >
    Well generally this is considered either HTML or URL escaping. So
    depending on which context you are needing (the above looks like URL)
    you may want to try the following two modules:

    URI::Escape
    HTML::Entities

    Both have functions for going in both directiones (encode/decode) and I
    have used both successfully. Naturally have a look at CPAN for their
    docs/installation, etc.

    [url]http://danconia.org[/url]

    Wiggins D'Anconia Guest

  3. #3

    Default Re: Text encoding reversal.

    --On Saturday, October 18, 2003 16:29 -0500 Wiggins d'Anconia
    <wigginsdanconia.org> wrote:
    > Well generally this is considered either HTML or URL escaping. So
    > depending on which context you are needing (the above looks like
    > URL) you may want to try the following two modules:
    >
    > URI::Escape
    > HTML::Entities
    Thanks, that got me going. It happens the context was URI, so the
    URI::Escape was what I needed.

    Daniel T. Staal

    ---------------------------------------------------------------
    This email copyright the author. Unless otherwise noted, you
    are expressly allowed to retransmit, quote, or otherwise use
    the contents for non-commercial purposes. This copyright will
    expire 5 years after the author's death, or in 30 years,
    whichever is longer, unless such a period is in excess of
    local copyright law.
    ---------------------------------------------------------------
    Daniel Staal Guest

Similar Threads

  1. XML text encoding
    By Aaron Brady in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: August 2nd, 08:32 PM
  2. dynamic text and character encoding in mozilla
    By vbpaixao00 in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: April 2nd, 12:26 AM
  3. Email text encoding
    By Jan Eden in forum PERL Beginners
    Replies: 1
    Last Post: February 11th, 03:30 PM
  4. HTML Text encoding of web controls
    By Guogang in forum ASP.NET Security
    Replies: 1
    Last Post: January 9th, 04:49 PM
  5. Doent Encoding for greek text?
    By pulp_136 webforumsuser@macromedia.com in forum Macromedia Freehand
    Replies: 0
    Last Post: September 16th, 08:20 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139