URI escaping in XSLT

I have following xml file:
<?xml version="1.0" encoding="utf-8"?>
<!-- Any string with russian symbols in utf-8 encoding -->
<href>/cgi-bin/search.cgi?q=&#9576;&#9619;&#9576;&#9563;&#9576;&#9488;&#9576;&#9617;&#9576;&#9563;&#9576;&#9618;</href>
And I have following xsl file:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="koi8-r"/>
<xsl:template match="/href">
Click me
</xsl:template>
</xsl:stylesheet>
Result of transformation is:
Click me
%E2%EE%EF%E0%EE%E1 - same string but in windows-1251 encoding. Although, I set koi8-r output encoding.
What's wrong?
I use XDK 9.2.0.1.0 on Windows NT 2000.

Add the non-ascii character to <xsl:text disable-output-escaping="yes"></xsl:text>

Similar Messages

  • Uri-escaping in XSLT-Processor when using html-method in xsl:output

    I've a problem with the XSLT-Processor:
    He tries to escape non-ASCII Characters in the href-Attribute when I use the output method "html". This is correct according to XSLT 1.0 and HTML4, but the processor doesn't really escape the characters, he just gives me a %3F ('?'-character) instead of %HH (where HH corresponds to the hex value of the char).
    I searched the forums and found a thread with the same problem, but there was no solution to this issue. The thread was started in 2002 so maybe someone came up with a solution.

    Add the non-ascii character to <xsl:text disable-output-escaping="yes"></xsl:text>

  • Not escaping '&' in XSLT

    I have a XSL stylesheet with the following code:
    <xsl:param name="link"/>
    <xsl:template match="mystuff">
             <a href="{$link}">                    
                 <xsl:value-of select="anchor"/>
             </a>
    </xsl:template>
    (...)'link' is a parameter whose value is passed from the java code, and normally contains the '&' character (as in URL query parameters).
    i.e.: http://www.myserver.net/servlet?p=a&m=b
    The problem is that when doing the XSL transformation, the '&' is escaped into '& amp;'.
    So instead of: <a href="http://www.myserver.net/servlet?p=a[b&[/bm=b">my link</a>
    I'm getting: <a href="http://www.myserver.net/servlet?p=a& amp;m=b">my link</a>
    That would be ok with most browsers (that I know) but the browser that I'm using doesn't have that support, so I really need to output the unescaped '&' in the link.
    I've tried <xsl:text disable-output-escaping="yes"> as well as setting the output to text, but neither worked (the former generated an exception during the transformation, and the latter didn't output the HTML tag).
    Any ideas?

    I understand DrClap's view on this. I've found that view on every thread out there, where someone asks for the same 'incorrect' behaviour.
    Still, even though I understand the correctness of XSLT, there should always be a way of bending the rules for cases when it's justified.
    The problem is that the browser is a J2ME app that's being developed here at work, and since they're trying to reduce its footprint I'm guessing making it handle the '& amp;' won't be a priority. The idea is that the server should make it easy on the client, so that we can have a really slim client.
    ajeru's tips didn't work either, but I did format my <a> tag that way (separate the href attribute) because it looks neater. Thanks.
    I ended up adding one line of Java code after the XSL transformation that just replaces all the '& amp' with '&'. It's an ugly hack, but it will keep things running, and that's what matters when deadlines approach ;)

  • Error with output escaping in xslt

    (using c-xml parser v2 2.0.1.0.0 for Sun Solaris)
    Hi all,
    when using the following in a XSL file:
    <xsl:text disable-output-escaping="yes">
    <&;>&quote;&apos;
    </xsl:text>
    the result in the output is:
    &#60;&#38;>"'
    My question: why are the lt and the amp not change into < and & correctly???
    And by the way, rsults are the same when using disable-output-escaping="no".
    null

    Hi Harmen,
    I also encounting the problem( I am using the C++ version), could you tell me if you have got the answer for it?
    Many thanks in advance.
    Sean
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Harmen:
    Sorry text got mingled, hope this won't:
    <xsl:text disable-output-escaping="yes">
    <&>"e;&apos;
    <&;>&quote;&apos;
    </xsl:text>
    And I forgot to mention I'm using the XSLSample program.<HR></BLOCKQUOTE>
    null

  • Output-escaping in XSLT

    I write a xml file as following:
    <?xml version="1.0" encoding="GB2312"?>
    <?xml-stylesheet href="xsl/order_edit.xsl" type="text/xsl"?>
    <Order>
         <Sales>&#24352;&#19977;</Sales>
         <Value>&#24352;&#19977;</Value>
    </Order>
    and the order_edit.xsl is as follwing:
    <?xml version="1.0" encoding="GB2312"?>
    <xsl:stylesheet version="1.1"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes" encoding="GB2312"/>
    <xsl:template match="/">
         <html>
              <body>
              <input type="text" name="test1">
              <xsl:attribute name="value">
                   <xsl:value-of select="Order/Sales"
    disable-output-escaping="yes">
                   </xsl:value-of>
              </xsl:attribute>
              </input>
              <br></br>
              <xsl:value-of select="Order/Value" disable-
    output-escaping="yes">
              </xsl:value-of>
              </body>
         </html>
    </xsl:template>
    </xsl:stylesheet>
    when I run the xml file in OC4J,the source code in IE is as
    following:
    <html>
    <body>
    <input name="test1" type="text" value="&amp;#24352;&amp;#19977;">
    <br>&#24352;&#19977;</body>
    </html>
    test1.value now is "&amp;#24352;&amp;#19977;",but I hope it be
    "&#24352;&#19977;" to be displayed correctly.("&#24352;&#19977;"
    is two chinese characters).
    What can I do?

    Acora IT Limited is a consultancy specialising in Oracle and XML
    applications, working on these XML Conundrums and found that
    posting this sort of question very difficult, as writing the
    code down to be displayed in the forums correctly often leads
    other missleading questions/answers. If you would like to e-
    mail the question in Plain Text to the address below I will have
    a look and try and answer your question to my best ability.
    [email protected]
    Acora IT Limited

  • Can't install thunar: perl-uri issue?

    trying to install thunar, i get these errors:
    root@homer:/home/sero # pacman -S thunar
    :: exo-devel conflicts with exo-dev. Remove exo-dev? [Y/n]
    Remove: exo-dev
    Targets: perl-uri-1.35-1 exo-devel-0.3.1.10rc1-2 thunar-0.4.0rc1-1
    Total Package Size: 1.7 MB
    Proceed with upgrade? [Y/n]
    :: Retrieving packages from extra...
    perl-uri-1.35-1 [################] 100% 75K 73.1K/s 00:00:01
    :: Retrieving packages from community...
    exo-devel-0.3.1.10rc1-2 [################] 100% 635K 313.0K/s 00:00:02
    thunar-0.4.0rc1-1 [################] 100% 1010K 314.3K/s 00:00:03
    checking package integrity... done.
    removing exo-dev... done.
    loading package data... done.
    checking for file conflicts...
    error: the following file conflicts were found:
    perl-uri: /usr/lib/perl5/site_perl/current/URI.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/Escape.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/Heuristic.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/QueryParam.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/Split.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/URL.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/WithBase.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/_foreign.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/_generic.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/_ldap.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/_login.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/_query.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/_segment.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/_server.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/_userpass.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/data.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/file.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/file/Base.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/file/FAT.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/file/Mac.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/file/OS2.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/file/QNX.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/file/Unix.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/file/Win32.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/ftp.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/gopher.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/http.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/https.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/ldap.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/ldapi.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/ldaps.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/mailto.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/mms.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/news.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/nntp.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/pop.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/rlogin.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/rsync.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/rtsp.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/rtspu.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/sip.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/sips.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/snews.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/ssh.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/telnet.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/tn3270.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/urn.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/urn/isbn.pm: exists in filesystem
    perl-uri: /usr/lib/perl5/site_perl/current/URI/urn/oid.pm: exists in filesystem
    errors occurred, no packages were upgraded.
    should i just delete those .pm files and try again? :?:

    i just moved URI to URI.sus (my standard thing for "suspend"), and URI.pm to URI.pm.sus, and it installed and seems to work. good to know i can just delete the old ones. i was not sure what package or perl program they might be associated with. thx
    >>> edit:
    root@homer:/usr/lib/perl5/site_perl/current/URI.sus # pacman -Qo *
    No package owns Escape.pm
    No package owns Heuristic.pm
    No package owns QueryParam.pm
    No package owns Split.pm
    No package owns URL.pm
    No package owns WithBase.pm
    No package owns _foreign.pm
    No package owns _generic.pm
    No package owns _ldap.pm
    No package owns _login.pm
    No package owns _query.pm
    No package owns _segment.pm
    No package owns _server.pm
    No package owns _userpass.pm
    No package owns data.pm
    No package owns file
    No package owns file.pm
    No package owns ftp.pm
    No package owns gopher.pm
    No package owns http.pm
    No package owns https.pm
    No package owns ldap.pm
    No package owns ldapi.pm
    No package owns ldaps.pm
    No package owns mailto.pm
    No package owns mms.pm
    No package owns news.pm
    No package owns nntp.pm
    No package owns pop.pm
    No package owns rlogin.pm
    No package owns rsync.pm
    No package owns rtsp.pm
    No package owns rtspu.pm
    No package owns sip.pm
    No package owns sips.pm
    No package owns snews.pm
    No package owns ssh.pm
    No package owns telnet.pm
    No package owns tn3270.pm
    No package owns urn
    No package owns urn.pm
    hmm, the paranoid part of me starts whispering: maybe you were hacked and someone installed some perl thing at some point? :shock:

  • After transfer to new server, doesn't work

    Hello iTunes U Administrators,
    A short description about my iTunes U experience - none. I am a new hire at my academic institution, and it so happens that the folks with the most experience with setting up iTunes U have just left for vacation.
    We just migrated our site to a new server, and iTunes U doesn't open any more. We are using the Perl script version. I have verified that Perl scripts are still able to run on the new server. The "https://deimos.apple.com/WebObjects/Core.woa/Browse/**.**" URL still works when I enter it into a browser.
    We are using the version of Perl script that requires the following modules:
    URI::Escape
    Digest::SHA
    Net::HTTP
    I am checking with IT to verify that these modules are installed . We are using Perl 5.8.8 on Linux.
    The main mode of failure seems to be that "aURL" is not being defined. Here is a snippet from our web page source:
    {start of php section}
    importrequestvariables("gp");
    if($launch == "open")
    passthru("valid-file-path/cgi-bin/itunespublic.pl");
    echo "<script type='text/javascript'>openApple(aURL); </script>";
    {end of php section}
    In the perl script, the sub invokeAction() does not seem to assign a value to aURL, even as it generates JavaScript tags and "aURL =".
    Any ideas?
    - Larry
    Message was edited by: XRayLarry

    In regards to my question not shwoing up properly, other folks seem to have this problem as well:
    http://discussions.apple.com/thread.jspa?threadID=1071301&tstart=30
    I am going to repost as a new question, as I can't edit the original posting anymore.

  • N9, multiple caldav sync entries with same user na...

    Hi, With N9, is it possible to create multiple CalDAV accounts with the same user name? I am asking this because with Google calendar I have shared calendars with family members, and it is possible to sync to these calendars using my own Google account and with a specific server path. I would just need to have several CalDAV entries in order to sync to each of them? (I am currently using CalDAV to sync to my wife's calendar and Mail for Exchange for my own gmail account but I don't quite like this.) On my previous phone I used GooSync which handled all this, but I don't yet know is it possible to use that with N9. Eero
    Solved!
    Go to Solution.

    posting this here as this is just about the top Google search hit:
    Check the URLs suggested here:
    http://forum.meego.com/showthread.php?t=3729
    Quote: 
    The URL for your main calendar should be: https://www.google.com/calendar/dav/ The URLs for additional calendars should be: https://www.google.com/calendar/dav/[email protected]​endar.google.com/ In both cases the trailing slashes are important. The '@' must not be URI escaped (i.e. '%40'). The long UUID can be found on the individual calendar settings panels, and on the Google page above. 

  • Help: Running iTunes U perl script: Can't locate Digest/SHA.pm

    We are using IIS 6.0 on Windows Server 2003.
    We have installed v5.008008 of Active Perl.
    We changed the sample iTunesU.pl script with our school data
    When we run the script from the command prompt we get the following error:
    Can't locate Digest/SHA.pm in @INC (@INC contains: E:/Perl/site/lib E:/Perl/lib
    .) at E:\Webapps\ajula\CGI\ITunesU.pl line 87.
    BEGIN failed--compilation aborted at E:\Webapps\ajula\CGI\ITunesU.pl line 87.
    How can fix this problem
    Thanks
    Moshe AJULA.EDU

    I followed the instructions in the sample files.
    On the server I ran perl -MCPAN -e shell
    It showed errors and problem for when installing Digest::SHA and Crypt::SSLeay
    Here is a copy of the restults.
    Can you help me figuring out what is wrong?
    Thanks
    -------------------------- Resutls of install --------------------
    In the cpan> prompt
    cpan shell -- CPAN exploration and modules installation (v1.9102)
    ReadLine support enabled
    cpan> install URI::Escape
    CPAN: Storable loaded ok (v2.16)
    Going to read E:\Perl\cpan\Metadata
    Database was generated on Mon, 26 Nov 2007 10:36:39 GMT
    URI::Escape is up to date (3.28).
    cpan> install Digest::SHA
    Running install for module 'Digest::SHA'
    Running make for M/MS/MSHELOR/Digest-SHA-5.45.tar.gz
    CPAN: checksum security checks disabled because Digest::SHA not installed.
    Please consider installing the Digest::SHA module.
    CPAN: Time::HiRes loaded ok (v1.9707)
    Scanning cache E:\Perl/cpan/build for sizes
    ............................................................................DONE
    CPAN: Compress::Zlib loaded ok (v1.4201)
    CPAN: Archive::Tar loaded ok (v1.3201)
    Digest-SHA-5.45/
    Digest-SHA-5.45/README
    Digest-SHA-5.45/src/
    Digest-SHA-5.45/src/hmac.h
    Digest-SHA-5.45/src/hmacxtra.c
    Digest-SHA-5.45/src/sha.h
    Digest-SHA-5.45/src/shaxtra.c
    Digest-SHA-5.45/src/sha64bit.h
    Digest-SHA-5.45/src/sha64bit.c
    Digest-SHA-5.45/src/hmac.c
    Digest-SHA-5.45/src/sha.c
    Digest-SHA-5.45/Makefile.PL
    Digest-SHA-5.45/examples/
    Digest-SHA-5.45/examples/dups
    Digest-SHA-5.45/META.yml
    Digest-SHA-5.45/Changes
    Digest-SHA-5.45/shasum
    Digest-SHA-5.45/typemap
    Digest-SHA-5.45/MANIFEST
    Digest-SHA-5.45/SHA.pm
    Digest-SHA-5.45/t/
    Digest-SHA-5.45/t/nistbyte.t
    Digest-SHA-5.45/t/nistbit.t
    Digest-SHA-5.45/t/rfc2202.t
    Digest-SHA-5.45/t/bitbuf.t
    Digest-SHA-5.45/t/hmacsha.t
    Digest-SHA-5.45/t/podcover.t
    Digest-SHA-5.45/t/methods.t
    Digest-SHA-5.45/t/sha224.t
    Digest-SHA-5.45/t/dumpload.t
    Digest-SHA-5.45/t/sha384.t
    Digest-SHA-5.45/t/sha1.t
    Digest-SHA-5.45/t/sha512.t
    Digest-SHA-5.45/t/gg.t
    Digest-SHA-5.45/t/allfcns.t
    Digest-SHA-5.45/t/gglong.t
    Digest-SHA-5.45/t/pod.t
    Digest-SHA-5.45/t/woodbury.t
    Digest-SHA-5.45/t/fips198.t
    Digest-SHA-5.45/t/ireland.t
    Digest-SHA-5.45/t/base64.t
    Digest-SHA-5.45/t/sha256.t
    Digest-SHA-5.45/SHA.xs
    CPAN: File::Temp loaded ok (v0.18)
    CPAN.pm: Going to build M/MS/MSHELOR/Digest-SHA-5.45.tar.gz
    Checking if your kit is complete...
    Looks good
    Writing Makefile for Digest::SHA
    Could not read 'E:\Perl\cpan\build\Digest-SHA-5.45-KfEI5d\META.yml'. Falling bac
    k to other methods to determine prerequisites
    'nmake' is not recognized as an internal or external command,
    operable program or batch file.
    MSHELOR/Digest-SHA-5.45.tar.gz
    nmake -- NOT OK
    Warning (usually harmless): 'YAML' not installed, will not store persistent stat
    e
    Running make test
    Can't test without successful make
    Running make install
    Make had returned bad status, install seems impossible
    Failed during this command:
    MSHELOR/Digest-SHA-5.45.tar.gz : make NO
    cpan> install LWP::UserAgent
    LWP::UserAgent is up to date (2.036).
    cpan> install Crypt::SSLeay
    Running install for module 'Crypt::SSLeay'
    Running make for D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz
    CPAN: LWP::UserAgent loaded ok (v2.036)
    Fetching with LWP:
    http://ppm.activestate.com/CPAN/authors/id/D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz
    CPAN: checksum security checks disabled because Digest::SHA not installed.
    Crypt-SSLeay-0.57
    Crypt-SSLeay-0.57/t
    Crypt-SSLeay-0.57/Changes
    Crypt-SSLeay-0.57/lib
    Crypt-SSLeay-0.57/certs
    Crypt-SSLeay-0.57/MANIFEST
    Crypt-SSLeay-0.57/TODO
    Crypt-SSLeay-0.57/typemap
    Crypt-SSLeay-0.57/MANIFEST.SKIP
    Crypt-SSLeay-0.57/eg
    Crypt-SSLeay-0.57/SSLeay.pm
    Crypt-SSLeay-0.57/SSLeay.xs
    Crypt-SSLeay-0.57/README
    Crypt-SSLeay-0.57/Makefile.PL
    Crypt-SSLeay-0.57/META.yml
    Crypt-SSLeay-0.57/eg/lwp-ssl-test
    Crypt-SSLeay-0.57/eg/net-ssl-test
    Crypt-SSLeay-0.57/certs/ca-bundle.crt
    Crypt-SSLeay-0.57/certs/notacakeynopass.pem
    Crypt-SSLeay-0.57/certs/notacacert.pem
    Crypt-SSLeay-0.57/lib/Crypt
    Crypt-SSLeay-0.57/lib/Net
    Crypt-SSLeay-0.57/lib/Net/SSL.pm
    Crypt-SSLeay-0.57/lib/Crypt/SSLeay
    Crypt-SSLeay-0.57/lib/Crypt/SSLeay/MainContext.pm
    Crypt-SSLeay-0.57/lib/Crypt/SSLeay/Conn.pm
    Crypt-SSLeay-0.57/lib/Crypt/SSLeay/X509.pm
    Crypt-SSLeay-0.57/lib/Crypt/SSLeay/Err.pm
    Crypt-SSLeay-0.57/lib/Crypt/SSLeay/CTX.pm
    Crypt-SSLeay-0.57/t/00-basic.t
    Crypt-SSLeay-0.57/t/02-live.t
    Crypt-SSLeay-0.57/t/01-connect.t
    CPAN.pm: Going to build D/DL/DLAND/Crypt-SSLeay-0.57.tar.gz
    ========================================================================
    No installed SSL libraries found in any of the following places.
    c:\openssl
    You will have to either specify a directory location at the following
    prompt, or rerun the Makefile.PL program and use the --lib switch
    to specify the path. If the path in question is considered standard
    on your platform, please consider filing a bug report in order to
    have it taken into account in a subsequent version of Crypt::SSLeay.
    Which SSL install path do you want to use? c:\openssl
    c:\openssl does not appear to be an SSL library installation, since
    the required header files were not found. The build cannot proceed.
    Warning: No success on command[E:\Perl\bin\perl.exe Makefile.PL]
    Warning (usually harmless): 'YAML' not installed, will not store persistent stat
    e
    DLAND/Crypt-SSLeay-0.57.tar.gz
    E:\Perl\bin\perl.exe Makefile.PL -- NOT OK
    Running make test
    Make had some problems, won't test
    Running make install
    Make had some problems, won't install
    Could not read 'E:\Perl\cpan\build\Crypt-SSLeay-0.57-5QWh9O\META.yml'. Falling b
    ack to other methods to determine prerequisites
    Failed during this command:
    DLAND/Crypt-SSLeay-0.57.tar.gz : writemakefile NO 'E:\Perl\bin\pe
    rl.exe Makefile.PL' returned status 512

  • Illegal character '%' at position 1 - need help with perl script!

    iTunes U Access Debugging
    Received
    Destination kean.edu
    Identity %22Jack Black%22 %3C%28jblack%29.%40kean.edu%3E %28jblack%29 %5B42%5D
    Credentials STUDENT%40urn%3Amace%3Aitunesu.com%3Asites%3Akean.edu
    Time 1178737992
    Signature 8786768fc3ebf9d3faf404a42bdb8a8d14c481e270fb75f084ebdd815553e1e4
    Analysis
    The destination string is valid and the corresponding destination item was found.
    The identity string is invalid: Illegal character '%' at position 1.
    The credential string is valid but contains no known credentials.
    The credential string contains the following credential which is not used within iTunes U:
    STUDENT%40urn%3Amace%3Aitunesu.com%3Asites%3Akean.edu
    The time string is valid and corresponds to 2007-05-09 19:13:12Z.
    The signature string is valid.
    Access
    Because the received signature and time were valid, the received identity and credentials were accepted by iTunes U.
    In addition, the following 2 credentials were automatically added by iTunes U:
    All@urn:mace:itunesu.com:sites:kean.edu
    Authenticated@urn:mace:itunesu.com:sites:kean.edu
    With these credentials, you have browsing and downloading access to the requested destination.

    Ken
    Thanks for lookiing into the issue.
    I am using the perl file downloaded from the iTunesU website.
    Here is the script:
    the only thing i replaced in this script is the shared secret, debug suffix, display name, email address and username with appropriate ones.
    use strict;
    use Digest::SHA qw(hmacsha256hex);
    use URI::Escape;
    use LWP::UserAgent;
    use Encode qw(encode);
    # to redirect errors to the browser
    use CGI::Carp qw(fatalsToBrowser);
    # to allow inputs from website using CGI scripting
    use CGI qw(:standard);
    sub main() {
    # Define your site's information. Replace these
    # values with ones appropriate for your site.
    my $siteURL = "https://deimos.apple.com/WebObjects/Core.woa/Browse/kean.edu";
    my $debugSuffix = "/abc123";
    my $sharedSecret = "YOURSHAREDSECRETKEYCODE";
    my $administratorCredential = "Administrator\@urn:mace:itunesu.com:sites:kean.edu";
    # Define the user information. Replace the credentials with the
    # credentials you want to grant to that user, and the optional
    # identity information with the identity of the current user.
    # For initial testing and site setup, use the singe administrator
    # credential defined when your iTunes U site was created. Once
    # you have access to your iTunes U site, you will be able to define
    # additional credentials and the iTunes U access they provide.
    my @credentialArray = ($administratorCredential);
    my $displayName = "Michael Searson";
    my $emailAddress = "msearson\@kean.edu";
    my $username = "msearson";
    my $userIdentifier = "42";
    # Append your site's debug suffix to the destination if you
    # want to receive an HTML page providing information about
    # the transmission of credentials and identity between this
    # program and iTunes U. Remove this code after initial
    # testing to instead receive the destination page requested.
    # uncomment the line below to access debug information from the
    # iTunes U server.
    $siteURL .= $debugSuffix;
    # Ready this data for transfer, the order must be correct!
    my $identity = getIdentityString($displayName, $emailAddress, $username, $userIdentifier);
    # turn the array of credentials into a semicolon delimited string
    my $credentials = getCredentialsString(@credentialArray);
    # time that this key is generated. The key is valid for 90 seconds.
    my $currentTime = time;
    my %token = getAuthorizationToken($identity, $credentials, $currentTime, $sharedSecret);
    invokeAction($siteURL, %token)
    sub getIdentityString()
    # Combine user identity information into an appropriately formatted string.
    # take the arguments passed into the function copy them to variables
    my ($displayName, $emailAddress, $username, $userIdentifier) = @_;
    # wrap the elements into the required delimiters.
    my $returnValue = sprintf('"%s" <%s> (%s) [%s]', $displayName,
    $emailAddress, $username, $userIdentifier);
    return $returnValue;
    sub getCredentialsString()
    # this is equivalent to join(';', @_); this function is present
    # for consistency with the Java example.
    # concatenates all the passed in credentials into a string
    # with a semicolon delimiting the credentials in the string.
    #make sure that at least one credential is passed in
    my $returnValue = "";
    my $credentialCount = @_;
    if ($credentialCount > 0) {
    for (my $i=0; $i < $credentialCount; $i++) {
    if ($i == 0) {
    $returnValue = sprintf('%s', $_[$i]);
    } else {
    $returnValue = sprintf('%s;%s', $returnValue, $_[$i]);
    } else {
    die "credentialArray must have at least one credential";
    return $returnValue;
    sub getAuthorizationToken()
    # Create a buffer with which to generate the authorization token.
    my ($identity, $credentials, $expriation, $key) = @_;
    my $signature;
    my $buffer;
    my %token_hash = ();
    my $escapedUTF8EncodedCredentials = uri_escape(encode("UTF-8", $credentials), "^A-Za-z0-9\-_.* ");
    my $escapedUTF8EncodedIdentity = uri_escape(encode("UTF-8", $identity), "^A-Za-z0-9\-_.* ");
    my $escapedUTF8EncodedExpiration = uri_escape(encode("UTF-8", $expriation), "^A-Za-z0-9\-_.* ");
    # create the POST Content and sign it
    $buffer .= "credentials=" . $escapedUTF8EncodedCredentials;
    $buffer .= "&identity=" . $escapedUTF8EncodedIdentity;
    $buffer .= "&time=" . $escapedUTF8EncodedExpiration;
    # This is necessary because uri_escape does encode spaces to pluses.
    $buffer =~ s/[ ]/+/g;
    # returns a signed message that is sent to the server
    $signature = hmacsha256hex($buffer, $key);
    $token_hash{'credentials'} = $escapedUTF8EncodedCredentials;
    $token_hash{'identity'} = $escapedUTF8EncodedIdentity;
    $token_hash{'time'} = $escapedUTF8EncodedExpiration;
    $token_hash{'signature'} = $signature;
    # append the signature to the POST content
    return %token_hash
    sub invokeAction()
    # Send a request to iTunes U and record the response.
    # Net:HTTPS is used to get better control of the encoding of the POST data
    # as HTTP::Request::Common does not encode parentheses and Java's URLEncoder
    # does.
    my ($siteURL, %token) = @_;
    #print "$token\n";
    my $ua = LWP::UserAgent->new;
    my $response = $ua->post($siteURL, \%token);
    print "Content-type: text/html\n\n";
    print $response->content;
    main();
    AND HERE IS THE OUTPUT
    Received
    Destination kean.edu
    Identity %22Michael Searson%22 %3Cmsearson%40kean.edu%3E %28msearson%29 %5B42%5D
    Credentials Administrator%40urn%3Amace%3Aitunesu.com%3Asites%3Akean.edu
    Time 1178819683
    Signature 4d012f2cb6e465dbc4ae41b4905ad3c334c695e36b06e9ae406acf02f25387d1
    Analysis
    The destination string is valid and the corresponding destination item was found.
    The identity string is invalid: Illegal character '%' at position 1.
    The credential string is valid but contains no known credentials.
    The credential string contains the following credential which is not used within iTunes U:
    Administrator%40urn%3Amace%3Aitunesu.com%3Asites%3Akean.edu
    The time string is valid and corresponds to 2007-05-10 17:54:43Z.
    The signature string is valid.
    Access
    Because the received signature and time were valid, the received identity and credentials were accepted by iTunes U.
    In addition, the following 2 credentials were automatically added by iTunes U:
    All@urn:mace:itunesu.com:sites:kean.edu
    Authenticated@urn:mace:itunesu.com:sites:kean.edu
    With these credentials, you have browsing, downloading, uploading, and editing access to the requested destination.

  • Hacking urxvt scripts -- Perl help needed [FINISHED]

    Before I start, I have no knowledge of Perl, and I'm finding it a fairly challenging language to read.
    I have one last thing that I want for urxvt to make it just right. I'd like to be able to select some text from the terminal, and launch a search in a browser using only the mouse. I started with the first example in the urxvtperl man pages:
    sub on_sel_grab {
    warn "you selected ", $_[0]->selection;
    I saved it to a file called 'grab' in my $HOME directory, and involked it with:
    urxvt --perl-lib $HOME -pe grab
    It works as it should; It echos whatever I highlight in the new terminal on the old terminal.
    The next step was to make a basic launcher. I thought something like this would work:
    sub on_sel_grab {
    system("firefox http://www.google.com/search?q=", $_[0]->selection);
    It doesn't, and other variations like '< $_[0]->selection' dont' work either. Static launchers do:
    sub on_sel_grab {
    system("firefox http://www.google.com/search?q=test");
    For my first question, how do I get the value of $_[0]->selection appended to the search URL?
    Last edited by skottish (2008-12-05 05:34:35)

    Ok, first, add this line to the top of your script somewhere:
    use URI::Escape;
    It seems to be a standard module (I have it on my system by default). This will enable you to escape characters for URIs (yeah, I know the name is obvious).
    Then update your sub as follows:
    sub on_sel_grab {
    # Load the selection into a variable, URI-escaping it first, so that the next command becomes clearer.
    # "my" is just for the variable declaration so that you don't encounter any problems if you're using "strict"
    my $selection = uri_escape($_[0]->selection);
    # Add single quotes around the URI to avoid potential shell problems.
    # The curly braces around the variable are just to be sure that it's read correctly.
    # I don't think it's necessary here, but it's good practice when you're your variables aren't space-padded.
    system("firefox 'http://www.google.com/search?q=${selection}');
    # Is this necessary? Why is there here? I think you can remove this.
    If you can't use "URI::Escape", you'll have to add several substitution lines (e.g. $selection =~ s/ /%20/g).
    edit
    I need to stop submitting replies that I've had open for 10 minutes.
    edit 2
    Try
    pacman -S perl-libwww
    I suspect that's the package providing the URI::Escape module.
    Last edited by Xyne (2008-11-25 00:41:39)

  • URL Access Scripting & accented characters

    I'm trying to write a small iTunes script that checks whether track titles of an album match those in the MusicBrainz database. But I'm running into a small problem when I try to retrieve the album information when it's title has accented characters.
    Here's a snippet of code:
    property baseURL : "http://musicbrainz.org/ws/1/release/"
    property tempFile : "Data:temp:tempAlbumInfo.xml"
    property albumTitle : "með suð í eyrum við spilum endalaust"
    set queryURL to "?type=xml&releasetypes=Official&limit=10&title=" & albumTitle
    set the clipboard to (baseURL & queryURL)
    -- Fetch the releases info from musicbrainz
    tell application "URL Access Scripting"
    download (baseURL & queryURL) to tempFile replacing yes
    end tell
    This gives me a 503 error from URL Access Scripting, but when I paste the variable just copied to the clipboard into Firefox, the page loads perfectly. Pasting it into Safari, it doesn't work.
    I'm guessing it has something to do with either the way URL Access Scripting and Safari rawurlencode their URLs, or some Unicode / Latin-1 problems.
    Oh, and for album titles without accented characters it all works perfectly. Any idea why this is happening? Thanks!

    Hello
    I think you need to escape URI string properly.
    Try replacing the line:
    set queryURL to "?type=xml&releasetypes=Official&limit=10&title=" & albumTitle
    with these two lines:
    set escapedTitle to do shell script "echo " & quoted form of albumTitle & " | perl -Mutf8 -MURI::Escape -lne 'print uri_escape($_);'"
    set queryURL to "?type=xml&releasetypes=Official&limit=10&title=" & escapedTitle
    Hope this may help,
    H
    Message was edited by: Hiroto (fixed typo: URI::Escape is the correct module.)

  • Apache rewrite rule working with whitespaces in portal URL

    Hello,
    we have a portal with several page groups. These are accessed through different virtual hosts in Apache. The rewrite rules look like:
    RewriteRule ^/website1(.*)$ /portal/page/portal/website1/$1 [PT]
    The problem is, it does not work when there is more than one space in URL (fe.: website1/subpage 1/subpage 2). The result is http error 413.
    I guess, it is related to PT flag and escaping URI.
    RewriteRule flag B would probably do the trick, but it is available in Apache 2.2 only.
    We have tried following, as well:
    RewriteMap escapemap int:escape
    RewriteRule ^/website1(.*)$ /portal/page/portal/website1/${escapemap:$1} [PT]
    That works for any number of spaces! On the other hand side, it does not work for Czech (accented; URI escaped) characters any more. :-(
    Does anyone have a working rewrite rule? Any hints?
    Thank you!
    ViNiL

    Hi Pratap
    Check SAP Note 698329 this note give details for logon fails
    U Need to enable SAPGUI for html
    goto se80 give internet services (in the drop down box)
    Below drop down give SYSTEM publish these service by right clicking system publish--complete service.
    and also publish same way WEBGUI
    and also enter ur server ip address and hostname in C:\WINDOWS\system32\drivers\etc-->hosts
    Hope this helps you.
    Regards
    Krishna.

  • Xdg-open

    Problem:
    Can't locate URI/Escape.pm in @INC (@INC contains: /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /usr/lib/xfce4/exo-1/exo-compose-mail-1 line 24.
    BEGIN failed--compilation aborted at /usr/lib/xfce4/exo-1/exo-compose-mail-1 line 24.
    (exo-helper-1:2540): Gtk-WARNING **: Im Modulpfad »clearlooks« konnte keine Themen-Engine gefunden werden,
    Solution: (as root)
    # perl -MCPAN -e shell
    (hit enter several times)
    cpan[1]> install URI::Escape
    cpan[1]> quit
    See http://www.question-defense.com/2010/01 … -pm-in-inc
    Is that a bug?

    Yes, i tried adding mime types manually
    Defaults:
    [Added Associations]
    application/vnd.ms-excel=userapp-soffice-VYSFLV.desktop;userapp-thunderbird-GOB0KV.desktop;
    application/x-shockwave-flash=userapp-firefox-8S50LV.desktop;userapp-chromium-CI92KV.desktop;
    application/octet-stream=vlc.desktop;userapp-gedit-0IS4KV.desktop;
    application/x-ms-dos-executable=wine.desktop;
    image/png=eog.desktop;
    image/jpeg=eog.desktop;
    application/x-cd-image=vlc.desktop;
    text/html=chromium.desktop;userapp-firefox-J8M9KV.desktop;
    text/x-csrc=userapp-gedit-CVMNLV.desktop;
    text/x-readme=gedit.desktop;
    application/x-java-archive=userapp-java-YCOYLV.desktop;
    text/plain=gedit.desktop;
    application/x-shellscript=userapp-gedit-P1C7LV.desktop;
    application/vnd.oasis.opendocument.text=userapp-soffice-11P6MV.desktop;evince.desktop;
    application/x-executable=userapp-gedit-K2DCNV.desktop;
    video/x-matroska=vlc.desktop;
    image/gif=eog.desktop;
    x-content/video-dvd=vlc.desktop;
    x-content/audio-cdda=vlc.desktop;
    x-content/audio-player=vlc.desktop;
    application/x-sqlite3=startcenter.desktop;userapp-gedit-P1C7LV.desktop;
    x-scheme-handler/file=exo-file-manager.desktop
    x-scheme-handler/trash=exo-file-manager.desktop
    video/x-msvideo=vlc.desktop;
    application/x-ole-storage=wine-extension-ini.desktop;userapp-gedit-CVMNLV.desktop;
    application/x-wine-extension-ini=userapp-gedit-1FMBRV.desktop;
    text/x-python=userapp-python2-J62BRV.desktop;
    I dont think it is using this file though. I tried renaming it, and still uses soffice. I logged onto another account, it asked me what to use to open a file, i chose evince, and now it uses evince for everything.
    EDIT: I don't think it is even using XDG-Open. I removed it from /usr/bin, and still the same thing.
    EDIT EDIT: It is using gnome-open
    Last edited by rp181 (2011-03-02 18:51:32)

  • Support for "escape-uri-attributes" in xsl:output ???

    Does XSLT processor supports
    new attribute "escape-uri-attributes" for
    xsl:output element?

    This was tested on 9.2.0.1 Beta (D) XDK for Java
    For an example _encXSQL.xsql?param=P&#352;PHF&#381;&#352;&#272;&#381;&#268;&#262;
    returns some garbage in href link, but the valu of the
    param is correct shown as text in html.
    Here are the code for XSQL page (_encXSQL.xsql)
    <?xml version="1.0" encoding="windows-1250"?>
    <?xml-stylesheet type="text/xsl" href="_encXSL.xsl" ?>
    <page
    param = ""
    xmlns:xsql="urn:oracle-xsql">
    <xsql:include-param name="param"/>
    </page>
    And the code for XSL (_encXSL.xsl)
    <?xml version="1.0" encoding="windows-1250"?>
    <xsl:stylesheet
    version="1.0"
    xmlns:xsl=" "
    target="_new">http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" ident="no" encoding="windows-1250"/>
    <!-- Root template -->
    <xsl:template match="/">
    <html>
    <head></head>
    <body>
    <a href="_encTestXSQL.xsql?param={page/param}">
    Param:
    <xsl:value-of select="page/param"/>
    </a>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>

Maybe you are looking for

  • Error code 39 - CD/DVD drive not working properly

    Satellite C55D-5170 came with Win 8 and the first automatic software update upgraded it to Win 8.1.  I believe this is the first time I have tried to access the DVD drive but I had successfully used the flash drive.  The DVD drive is not recognized. 

  • Importing BP opening balance  for AP&AR aging report

    I use DTW import BP opening balance, for example Maybe AR  posting date is 20080908 and 20090808 ,but I importing GL opening balance at the time of 20091231. I wonder whether I shoud import posting date  of  AR templete and datatime of databaseserver

  • Chat System: ConnectException: Connection timed out: connect

    Hi There, I am developing a chat system as part of a University project. To explain what I have implemented: I have three java classes; 1. Chat Server class which is constantly listening for incoming socket connection on a particular socket: while (t

  • Can't save an image used as link

    After I updated my iPhone 3GS to iOS 5.0.1, I noticed I can no longer save images  that are being used as links on websites. Using the usual method of holding my finger on these type of images, brings up the following options: "Open", "Open in New Pa

  • Can the backlit keyboard be turned on/off?

    Thinking about selling the Black Book for a new 2.4 Al Macbook. That is the only question I would like to know the answer to, can the keyboard be turned on/off? Thanks Steve