Thread HTML::Parser und substr() (46 answers)
Opened by GwenDragon at 2023-05-09 13:09

haj
 2023-05-09 18:49
#194837 #194837
User since
2015-01-07
531 Artikel
BenutzerIn

user image
Mir ist noch etwas aufgefallen: Wenn Du dekodierten (also "Characters") Text reinfütterst, dann musst Du Deinen Text-Handler (Zeile 29) entsprechend anpassen:

Code (perl): (dl )
1
2
3
4
# Handlerroutine für Textinhalt registrieren
    $p->handler(
        text => sub { my $s = shift; push @replaced_data, $s; }, 
                "text" # <--- Decodierung ist nicht mehr notwendig


Zum Rettungsanker: Davon rate ich ab.

2023-05-09T16:09:02 GwenDragon
Code (perl): (dl )
    use bytes;


Die Beschreibung des CPAN:bytes-Moduls sagt:
Quote
Use of this module for anything other than debugging purposes is strongly discouraged. If you feel that the functions here within might be useful for your application, this possibly indicates a mismatch between your mental model of Perl Unicode and the current reality. In that case, you may wish to read some of the perl Unicode documentation: Perldoc:perluniintro, Perldoc:perlunitut, Perldoc:perlunifaq and Perldoc:perlunicode.

View full thread HTML::Parser und substr()