in reply to Sending post via enurl doesn't work either (though from documentation seems like it should)
in thread problem with german chars in html post fetch

As you can see in my chart above, sending a query using germanchars_to_strange_html_chars() and enurl() gives the same results. If they differ for you, i don´t know why.
  • Comment on Re: Sending post via enurl doesn't work either (though from documentation seems like it should)

Replies are listed 'Best First'.
The problem was utf-8 versus windows ansi
by tphyahoo (Vicar) on Jan 11, 2005 at 16:30 UTC
    Okay, I think I've figured this out. The upshot is that the reason Holli and I are getting different results is probably because his script file is encoded in Utf8, whereas mine is encoded with Ansi windows.

    When I converted my script to utf8 with editpad before running it, it worked. (Originally Holli had suggested that I convert to "dos mode", which I interpreted as running convert Ansi->OEM in editpad (since that's what the editpad help file calls dosmode). However, if I had run convert ANSI->utf8, I would have had success and saved myself many hours of head scratching. OTOH, at least I'm beginning to get a better understanding for troubleshooting encoding issues, and I hope by sharing my experience I may help others.

    During the headscratching phase, I painstakingly put together the following chart comparing utf8 and windows ansi.

    symbol encoding editpad hex mode display editpad normal mode displays
    ö ansi windows f6 ö
    ö utf8 c3b6 ö
    ö dos mode (oem) 94

    Editpad users (limited time demo version available for download) may appreciate the following info. Windows Ansi is editpad's default mode. utf8 characters were derived by running editpad->convert->unicode->ansi to utf8. dos mode characters, I ran convert->ANSI to OEM. Hex mode results for all of the above were derived in editpad by switching to hexmode with ctrl-h.

    I conclude that CGI::enurl does not work at spitting out appropriate post characters when fed german characters encoded with the windows default. Or put more simply, cgi::enurl is windows unfriendly. I wonder if there is a way to contribute to cgi::enurl and URI::Escape (which works the same way), to make them more windows friendly. But I will leave this to another day.

    thomas.

      Reference for encoding table:

      http://www.microsoft.com/globaldev/reference/sbcs/1252.htm

Different versions?
by tphyahoo (Vicar) on Jan 10, 2005 at 11:37 UTC
    Thanks again holli. The fact seem to be that

    enurl('börse') gives

    b%F6rse

    on my system, whereas it gives

    börse

    on your system. I am guessing we have different perl versions, different module versions, or different default encodings.

    perl -MCGI::Enurl -e"print $CGI::Enurl::VERSION" > enUrlVersion.txt
    outputs 1.07 for my enurl version.
    <code> perl -v > perlVoutput.txt
    outputs
    This is perl, v5.8.4 built for MSWin32-x86-multi-thread (with 3 registered patches, see perl -V for more detail) Copyright 1987-2004, Larry Wall Binary build 810 provided by ActiveState Corp. http://www.ActiveState.com ActiveState is a division of Sophos. Built Jun 1 2004 11:52:21
    I am not sure how to get the default encoding. Truly stumped...

    thomas.

    *******

    UPDATE: Relevant (though so far not helpful) documentation seems to be at: