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

CGI character translation???

Expand Messages
  • Thom Hehl
    OK, not exactly perl, but this was the closest list I could find. I am running a perl CGI script that launches a java program. This java program writes output
    Message 1 of 3 , Aug 2, 2005
    • 0 Attachment
      OK, not exactly perl, but this was the closest list I could find.

      I am running a perl CGI script that launches a java program. This java
      program writes output files that are delimited using what I believe to
      be a unicode character. On most editors it looks like an upside-down
      question mark, which I believe is correct. On some editors, it shows as
      a degree symbol. This character is represented by the hex pair 0xc2a1.
      Here is the character '¡'.

      Now here is the problem. When I test my java program everything is
      great. When I test the perl script to launch the java program, all is
      still well. When I run my perl script through CGI, though, it replaces
      each occurrence of the above character with ??. I cannot understand why
      the CGI is interfering with file output from my program. This is not
      going through display, but is directly writing this file. Anyone have
      any ideas?

      Also, if anyone can suggest a better list, I'd appreciate that too.

      Thanks.
    • Philip M. Gollucci
      ... Are you using CGI.pm(what version if so) and are you passing this though the $ENV{QUERY_STRING} ? You might try a utf-8 perl list: from
      Message 2 of 3 , Aug 2, 2005
      • 0 Attachment
        Thom Hehl wrote:
        > OK, not exactly perl, but this was the closest list I could find.
        >
        > I am running a perl CGI script that launches a java program. This java
        > program writes output files that are delimited using what I believe to
        > be a unicode character. On most editors it looks like an upside-down
        > question mark, which I believe is correct. On some editors, it shows as
        > a degree symbol. This character is represented by the hex pair 0xc2a1.
        > Here is the character '¡'.
        >
        > Now here is the problem. When I test my java program everything is
        > great. When I test the perl script to launch the java program, all is
        > still well. When I run my perl script through CGI, though, it replaces
        > each occurrence of the above character with ??. I cannot understand why
        > the CGI is interfering with file output from my program. This is not
        > going through display, but is directly writing this file. Anyone have
        > any ideas?
        >
        > Also, if anyone can suggest a better list, I'd appreciate that too.
        Are you using CGI.pm(what version if so) and are you passing this though
        the $ENV{QUERY_STRING} ?

        You might try a utf-8 perl list:

        from http://lists.cpan.org/
        this is the only one with utf-8 in the desc.

        http://lists.cpan.org/showlist.cgi?name=perl-i18n

        UTF-8 continually has bugs fixed and enhanced in the perl core. What
        version of perl are you using ?


        Sorry I only asked questions, maybe they will point you somewhere useful.
      • Gedanken
        On Tue, 2 Aug 2005, Thom Hehl wrote: Possibly the LANG environment variable for the user you test with is not the same as the LANG var for the user the
        Message 3 of 3 , Aug 2, 2005
        • 0 Attachment
          On Tue, 2 Aug 2005, Thom Hehl wrote:

          Possibly the LANG environment variable for the user you test with is not
          the same as the LANG var for the user the webserver runs as?

          I had a similar thing i tried to debug a few weeks ago. I couldnt 'su' to
          the user 'nobody' which was annoying so it took some time to figure out it
          was an environ problem.

          ged

          OK, not exactly perl, but this was the closest list I could find.

          I am running a perl CGI script that launches a java program. This java program
          writes output files that are delimited using what I believe to be a unicode
          character. On most editors it looks like an upside-down question mark, which I
          believe is correct. On some editors, it shows as a degree symbol. This
          character is represented by the hex pair 0xc2a1. Here is the character '¡'.

          Now here is the problem. When I test my java program everything is great. When
          I test the perl script to launch the java program, all is still well. When I
          run my perl script through CGI, though, it replaces each occurrence of the
          above character with ??. I cannot understand why the CGI is interfering with
          file output from my program. This is not going through display, but is directly
          writing this file. Anyone have any ideas?

          Also, if anyone can suggest a better list, I'd appreciate that too.

          Thanks.


          --
          gedanken
        Your message has been successfully submitted and would be delivered to recipients shortly.