IrfanView Comment bug?

Discussion in 'Digital Photography' started by Terry Pinnell, Mar 17, 2013.

  1. I open a JPG in IrfanView, then its Comment dialog. If I enter text which
    includes the backslash, such as in c:\test, it gets written as c:\\test.
    If Write was used again, it would become c:\\\\test, and so on. Looks
    plainly like a bug.

    Tests with Picasa and FastStone Image Viewer gave correct handling of the
    backslash.

    --
    Terry, East Grinstead, UK
    Terry Pinnell, Mar 17, 2013
    #1
    1. Advertising

  2. Terry Pinnell

    Robert Coe Guest

    On Sun, 17 Mar 2013 11:34:53 +0000, Terry Pinnell <>
    wrote:
    : I open a JPG in IrfanView, then its Comment dialog. If I enter text which
    : includes the backslash, such as in c:\test, it gets written as c:\\test.
    : If Write was used again, it would become c:\\\\test, and so on. Looks
    : plainly like a bug.
    :
    : Tests with Picasa and FastStone Image Viewer gave correct handling of the
    : backslash.

    Irfanview is betraying its Unix (or Linux) origins. In Unix and its
    derivatives, the backslash is an escape character, indicating that the
    following character is to be taken literally, ignoring any control function it
    might otherwise have had. So the backslash itself, if it appears in ordinary
    text, must be doubled. Unix needs such a feature to balance its complex,
    highly recursive, command line capability. Unix programmers will sometimes
    double the backslash, as was done here, to keep it from being lost in a
    command scan. Since Windows doesn't need the doubling, the extra backslash
    becomes superfluous.

    Depending on your point of view, this explains either why the behavior you
    describe isn't a bug or why the bug is there.

    Bob
    Robert Coe, Mar 17, 2013
    #2
    1. Advertising

  3. On Sun, 17 Mar 2013 11:34:53 +0000, Terry Pinnell wrote:

    > I open a JPG in IrfanView, then its Comment dialog. If I enter text which
    > includes the backslash, such as in c:\test, it gets written as c:\\test.
    > If Write was used again, it would become c:\\\\test, and so on. Looks
    > plainly like a bug.


    Confirmed for both, opening with Unicode plugin and without it. Error
    is on reading, which assumes the need for character escape sequences.
    Such sequences aren't necessary/expected in *.jpeg comments, though.

    BeAr
    --
    ===========================================================================
    = What do you mean with: "Perfection is always an illusion"? =
    ===============================================================--(Oops!)===
    B. R. 'BeAr' Ederson, Mar 17, 2013
    #3
  4. Terry Pinnell

    David Taylor Guest

    On 17/03/2013 12:32, Robert Coe wrote:
    []
    > Irfanview is betraying its Unix (or Linux) origins.

    []
    > Bob


    More likely the programmer's use of "C" and its documentation, as there
    is no UNIX-like version of IrfanView.
    --
    Cheers,
    David
    Web: http://www.satsignal.eu
    David Taylor, Mar 17, 2013
    #4
  5. Terry Pinnell

    Mayayana Guest

    If you look at the file in a hex editor you'll
    see it's been saved properly. It writes whatever
    is in the window but escapes all backslashes with
    an extra backslash when the text is displayed. It
    does seem to be a bug. Unix has nothing to do
    with it.

    The only thing I can guess is the following:

    \ is an operator character in RichText (RTF) such that
    an actual \ in plain text (TXT) must be escaped by an
    extra \ when converted to RichText.

    Windows standard text windows include plain text
    and RichText. The IV comments text window is a plain
    text window. It may be that it used to be a RichEdit
    window -- or that a RichEdit window was planned and n
    ot implemented -- and updating of the text display
    operation was overlooked.

    Just a thought. I can't think of any valid reason for
    the way it's working now.

    --
    --
    "Terry Pinnell" <> wrote in message
    news:...
    |I open a JPG in IrfanView, then its Comment dialog. If I enter text which
    | includes the backslash, such as in c:\test, it gets written as c:\\test.
    | If Write was used again, it would become c:\\\\test, and so on. Looks
    | plainly like a bug.
    |
    | Tests with Picasa and FastStone Image Viewer gave correct handling of the
    | backslash.
    |
    | --
    | Terry, East Grinstead, UK
    Mayayana, Mar 17, 2013
    #5
  6. "Mayayana" <> wrote:

    > If you look at the file in a hex editor you'll
    >see it's been saved properly. It writes whatever
    >is in the window but escapes all backslashes with
    >an extra backslash when the text is displayed. It
    >does seem to be a bug. Unix has nothing to do
    >with it.
    >
    >The only thing I can guess is the following:
    >
    > \ is an operator character in RichText (RTF) such that
    >an actual \ in plain text (TXT) must be escaped by an
    >extra \ when converted to RichText.
    >
    > Windows standard text windows include plain text
    >and RichText. The IV comments text window is a plain
    >text window. It may be that it used to be a RichEdit
    >window -- or that a RichEdit window was planned and n
    >ot implemented -- and updating of the text display
    >operation was overlooked.
    >
    > Just a thought. I can't think of any valid reason for
    >the way it's working now.
    >
    >--


    Thanks all. I've reported the bug to Irfan and will post back here with
    his response.

    @BeAr: I agree it's not a common requirement in most everyday text, but
    for me it's essential! If I implement my Comment/Captions management with
    TXT files as per our parallel discussion, then my comment will have to
    include the full filename. I don't want to see that initially with double
    backslashes like this
    C:\\Docs\\My Pictures\\PHOTOS\\Walks
    UK\\TP04\\TP04-All\\Tests\\20040820-111730.JPG

    then later, after an edit, quadruple, octuple...

    I'm an hour or so into trying ExifTools GUI but have a couple of basic
    hangups. Will post in that thread.

    --
    Terry, East Grinstead, UK
    Terry Pinnell, Mar 17, 2013
    #6
  7. On Sun, 17 Mar 2013 14:57:59 +0000, Terry Pinnell wrote:

    [IrfanView Jpeg comment reading bug]
    | Error is on reading, which assumes the need for character escape
    | sequences. Such sequences aren't necessary/expected in *.jpeg
    | comments, though.
    > @BeAr: I agree it's not a common requirement in most everyday text, but
    > for me it's essential!


    What I wrote is: *escaping characters* is not necessary/expected. ;-)

    BeAr
    --
    ===========================================================================
    = What do you mean with: "Perfection is always an illusion"? =
    ===============================================================--(Oops!)===
    B. R. 'BeAr' Ederson, Mar 17, 2013
    #7
  8. "B. R. 'BeAr' Ederson" <> wrote:

    >On Sun, 17 Mar 2013 14:57:59 +0000, Terry Pinnell wrote:
    >
    >[IrfanView Jpeg comment reading bug]
    >| Error is on reading, which assumes the need for character escape
    >| sequences. Such sequences aren't necessary/expected in *.jpeg
    >| comments, though.
    >> @BeAr: I agree it's not a common requirement in most everyday text, but
    >> for me it's essential!

    >
    >What I wrote is: *escaping characters* is not necessary/expected. ;-)
    >
    >BeAr


    OK, my slip!

    --
    Terry, East Grinstead, UK
    Terry Pinnell, Mar 17, 2013
    #8
  9. Terry Pinnell

    Jon Danniken Guest

    On 03/17/2013 05:32 AM, Robert Coe wrote:
    > On Sun, 17 Mar 2013 11:34:53 +0000, Terry Pinnell <>
    > wrote:
    > : I open a JPG in IrfanView, then its Comment dialog. If I enter text which
    > : includes the backslash, such as in c:\test, it gets written as c:\\test.
    > : If Write was used again, it would become c:\\\\test, and so on. Looks
    > : plainly like a bug.
    > :
    > : Tests with Picasa and FastStone Image Viewer gave correct handling of the
    > : backslash.
    >
    > Irfanview is betraying its Unix (or Linux) origins.


    Irfanview has no *nix origins, as it is, and always has been, a Windows
    application.

    Perhaps you are thinking of another application?

    Jon
    Jon Danniken, Mar 17, 2013
    #9
  10. Terry Pinnell <> wrote:


    >Thanks all. I've reported the bug to Irfan and will post back here with
    >his response.


    Pleased to report that Irfan fixed it with impressive promptness. A new
    Metadata.dll in the Plugins folder did the trick. I expect Irfan will soon
    release it.

    --- Start paste ---
    "\" is a special character and it was handled like that in the
    original read-comment code from the JPG-Library ;-)

    => I removed the special handling, so it should be OK now, I hope no
    side effects.

    See the new plugin DLL, unzip it over your current DLL.
    --- End paste ---


    --
    Terry, East Grinstead, UK
    Terry Pinnell, Mar 18, 2013
    #10
  11. Terry Pinnell <> wrote:

    >Terry Pinnell <> wrote:
    >
    >
    >>Thanks all. I've reported the bug to Irfan and will post back here with
    >>his response.

    >
    >Pleased to report that Irfan fixed it with impressive promptness. A new
    >Metadata.dll in the Plugins folder did the trick. I expect Irfan will soon
    >release it.
    >
    >--- Start paste ---
    >"\" is a special character and it was handled like that in the
    >original read-comment code from the JPG-Library ;-)
    >
    >=> I removed the special handling, so it should be OK now, I hope no
    >side effects.
    >
    >See the new plugin DLL, unzip it over your current DLL.
    >--- End paste ---


    Irfan has uploaded it here:
    http://www.irfanview.net/plugins/metadata.zip

    --
    Terry, East Grinstead, UK
    Terry Pinnell, Mar 19, 2013
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. janet_princess_2k
    Replies:
    0
    Views:
    478
    janet_princess_2k
    Aug 9, 2006
  2. A bug catalogue for bug lovers!

    , Sep 16, 2005, in forum: Digital Photography
    Replies:
    4
    Views:
    519
  3. Susan
    Replies:
    60
    Views:
    1,752
    Blinky the Shark
    Jul 23, 2008
  4. Annu Pai
    Replies:
    11
    Views:
    739
    Annu Pai
    Mar 30, 2009
  5. Terry Pinnell

    IrfanView Comments data - bug?

    Terry Pinnell, Feb 10, 2012, in forum: Digital Photography
    Replies:
    8
    Views:
    318
    Terry Pinnell
    Feb 11, 2012
Loading...

Share This Page