in reply to CueCat decoding with Perl - revisited

I don't have an answer for you, but I haven't seen this sort of thing on Mac OS X. When I look at STDIN, I get just what I expect.

brian[688]$ perl -p -e 1 9780937175903 90000

I smell something between the CueCat and STDIN playing with your data.

--
brian d foy <brian@stonehenge.com>

Replies are listed 'Best First'.
Re^2: CueCat decoding with Perl - revisited
by saintmike (Vicar) on Apr 04, 2005 at 03:13 UTC
    Interesting. I ran more tests on different terminals and the results are baffling:
    (1a) Windows command window: OK (1b) Windows command window + Activestate 5.8.4: OK (1c) Windows Notepad: OK (1d) Windows cygwin shell: Garbled (1e) Windows cygwin shell + cygwin perl 5.8.5: Garbled (1f) Windows cygwin shell + perl Activestate 5.8.4: OK (2a) Linux Fedora 2/3, X11 terminal: Garbled (2b) Linux Fedora 2/3 without X11: OK
    While the regular Windows command window works fine (with and without perl), the cygwin shell, doesn't, however, calling Activestate perl 5.8.4 from within the cygwin shell seems to fix it.

    On the Linux side, it didn't matter if perl was involved or not, neither did the version of perl (tried 5.6.1 - 5.8.6).

    The terminal settings (stty -all) in 2a and 2b were identical, $TERM was "linux" vs. "xterm" but setting it to "linux" in X11 didn't help.

    Strange, strange ...

      Curious: I just tried it on Apple's X xterm and it comes out wrong, but not garbled: everything shows up twice for one scan. I tried this a couple times with the same result (and I know I'm not scanning it twice!)

      albook:~ brian$ echo $TERM xterm albook:~ brian$ perl -p -e 0 9780937175903 90000 9780937175903 90000

      Changing the TERM type didn't help anything.

      --
      brian d foy <brian@stonehenge.com>