FHEM Forum

FHEM => fhem-users => Thema gestartet von: Guest am 24 Juli 2009, 20:57:25

Titel: [FHZ] Fehler in 01_FHEMWEB: binmode unter Windows für BIN Files
Beitrag von: Guest am 24 Juli 2009, 20:57:25
Originally posted by: <email address deleted>

Hallo Rudi,

unter MS-Windows müssen Binary Files mit binmode gelesen werden,
ansonsten wird aus 0D0A ein 0A.
Hier die Payload via Netmon für Zoom-out.png:
ohne binmode: 89 50 4E 47 0A 1A 0A ...
Es muss ankommen 89 50 4E 47 0D 0A 1A 0A ...

Überprüft und wie folgt im /icon Handing getestet:
    open(FH, "$__dir/$1") || return;
    binmode (FH); # necessary for Windows
    pO join("", );
    close(FH);

Ggf auch im gnuplot / SVG Handling notwendig, aber noch nicht eruiert.

Gruß
Klaus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "FHEM users on Linux" group.
To post to this group, send email to fhem-users@googlegroups.com
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en
-~----------~----~----~----~------~----~------~--~-
Titel: [FHZ] Re: Fehler in 01_FHEMWEB: binmode unter Windows für BIN Files
Beitrag von: erwin am 25 Juli 2009, 17:41:55
                                                   

>     binmode (FH); # necessary for Windows

Eingebaut, fuer Feste Icons und fuer Gnuplot-Bilder

> Ggf auch im gnuplot / SVG Handling notwendig, aber noch nicht eruiert.

SVG wird in perl generiert, da ist kein open notwendig.

Gruss,
  Rudi
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "FHEM users on Linux" group.
To post to this group, send email to fhem-users@googlegroups.com
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en
-~----------~----~----~----~------~----~------~--~-
Titel: [FHZ] Re: Fehler in 01_FHEMWEB: binmode unter Windows für BIN Files
Beitrag von: Guest am 30 August 2009, 18:35:45
Originally posted by: <email address deleted>

> >     binmode (FH); # necessary for Windows
>
> Eingebaut, fuer Feste Icons und fuer Gnuplot-Bilder

im   } elsif($a[1] eq "save") {
fehlt er noch und zwar hier

    $__data =~ s/\r//g if($^O ne 'MSWin32');
    binmode (FH); #necessary for windows /kpb 090830
    print FH $__data;
    close(FH);

Vielleicht dann btw auch den MSWin ersetzen durch
if($^O !~ m/Win/)

Gruss
Klaus

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "FHEM users" group.
To post to this group, send email to fhem-users@googlegroups.com
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en
-~----------~----~----~----~------~----~------~--~-
Titel: [FHZ] Re: Fehler in 01_FHEMWEB: binmode unter Windows für BIN Files
Beitrag von: rudolfkoenig am 30 August 2009, 18:52:56
                                                   

> fehlt er noch und zwar hier

Eigebaut, eingecheckt.

> Vielleicht dann btw auch den MSWin ersetzen durch
> if($^O !~ m/Win/)

Jawoll! :)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "FHEM users" group.
To post to this group, send email to fhem-users@googlegroups.com
To unsubscribe from this group, send email to fhem-users+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/fhem-users?hl=en
-~----------~----~----~----~------~----~------~--~-