Add Poll
 
Options: Text Color Split Pie
 
 
 
 
 
 
 
 
Poll Comment:
Max 500 characters. Remaining characters:
days and minutes. Leave it blank if you don't want to set it now.

Please type the characters exactly as they appear in the image,
without the first 2 and last 2 characters.
The characters must be typed in the same order,
and they are case-sensitive.
Open Preview Preview

You can resize the textbox by dragging the right or bottom border.
Off Topic Comment Insert Spoiler
Insert Hyperlink Insert FTP Link Insert Image Insert E-mail Insert Media Insert Table Insert Table Row Insert Table Column Insert Horizontal Rule Insert Teletype Insert Code Insert Quote Edited Superscript Subscript Insert List /me - my name Insert Marquee Insert Timestamp No Parse
Bold Italicized Underline Insert Strikethrough Highlight
                       
Change Text Color
Insert Preformatted Text Left Align Centered Right Align
resize_wb
resize_hb







Max 5000 characters. Remaining characters:
Text size: %
More Smilies
View All Smilies
Collapse additional features Collapse/Expand additional features Smiley Wink Cheesy Grin Angry Sad Shocked Cool Huh Roll Eyes Tongue Embarrassed Lips Sealed Undecided Kiss Cry
Topic Summary - Displaying 7 post(s). Click here to show all
Posted by: Monni
Posted on: Sep 2nd, 2014 at 4:41pm
I promised I won't give up until I find where it goes wrong Wink
Posted by: Dandello
Posted on: Sep 2nd, 2014 at 1:36pm
Good job  Smiley
Posted by: Monni
Posted on: Sep 2nd, 2014 at 9:28am
Dandello wrote on Sep 2nd, 2014 at 4:29am:
Thanks - that's what happens when I hurry.  Tongue


I know... It took me a while after I upgraded Perl to figure out what was the root cause of the encoding issues... Then it was just cleaning up the code and redoing LivePreview.pm to do the conversion the right way Wink
Posted by: Dandello
Posted on: Sep 2nd, 2014 at 4:29am
Thanks - that's what happens when I hurry.  Tongue
Posted by: Monni
Posted on: Sep 2nd, 2014 at 3:52am
I think you messed up one line in the patch:

Code
Select All
 Index: cgi-bin/yabb2/Sources/LivePreview.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/LivePreview.pm	(revision 1559)
 +++ cgi-bin/yabb2/Sources/LivePreview.pm	(working copy)
 @@ -80,7 +80,7 @@
      $myname = $FORM{'guestname'};
      uri_unescape($myname);
      if ( $yymycharset ne 'UTF-8' ) {
 -         $csubject = decode_utf8($myname);
 +         $myname = decode_utf8($myname);
      }
      $myname =~ s/[\r\n]//gsm;
      FromChars($myname);
  

Posted by: Monni
Posted on: Sep 1st, 2014 at 12:30am
Part 2/2:
Code
Select All
 Index: cgi-bin/yabb2/Sources/YaBBC.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/YaBBC.pm	(revision 1557)
 +++ cgi-bin/yabb2/Sources/YaBBC.pm	(working copy)
 @@ -20,9 +20,6 @@
  LoadLanguage('Post');

  $yyYaBBCloaded = 1;
 -if ( $yymycharset ne 'UTF-8' ) {
 -    use HTML::Entities;
 -}

  sub MakeSmileys {
      my ($inp) = @_;
 @@ -106,7 +103,7 @@
                  else {
                      $fqauthor = decloak($qauthor);

 - # if all fails it is a non existing real name so decode and asign as screenname
 + # if all fails it is a non-existing real name so decode and assign as screenname
                  }
              }
              else {
 @@ -132,9 +129,6 @@

      $qmessage = parseimgflash($qmessage);
      $qdate = timeformat($qdate,0,0,0,1);    # generates also the global variable $daytxt
 -    if ( $yymycharset ne 'UTF-8' ) {
 -        encode_entities($qdate, "\200-\377"); # escape high ASCII
 -    }
      $cssbg = $ycssvalues[ ( $ycsscounter % $ycssnum ) ];
      $ycsscounter++;
      if ( $fqauthor eq q{} || $qlink eq q{} || $qdate eq q{} ) {
  



This fixes it good... No more hacks Smiley
Posted by: Monni
Posted on: Aug 31st, 2014 at 10:06pm
Code
Select All
 Index: cgi-bin/yabb2/Sources/LivePreview.pm
 ===================================================================
 --- cgi-bin/yabb2/Sources/LivePreview.pm	(revision 1557)
 +++ cgi-bin/yabb2/Sources/LivePreview.pm	(working copy)
 @@ -22,6 +22,9 @@
  $livepreviewpmver = 'YaBB 2.6.0 $Revision$';
  if ( $action eq 'detailedversion' ) { return 1; }
  use URI::Escape;
 +if ( $yymycharset ne 'UTF-8' ) {
 +    use Encode;
 +}
  LoadCensorList();
  guard();
  if ( $enable_ubbc  ) {
 @@ -35,6 +38,9 @@
      $FORM{'message'} =~ s/\r//gsm;
      $message = $FORM{'message'};
      uri_unescape($message);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +         $message = decode_utf8($message);
 +    }
      $message =~ s/\[ch8203\]//igsm;
      $message =~ s/\​//igsm;
      FromChars($message);
 @@ -58,6 +64,9 @@
      $message  = Censor($message);
      $csubject = $FORM{'subject'};
      uri_unescape($csubject);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +         $csubject = decode_utf8($csubject);
 +    }
      $csubject =~ s/[\r\n]//gsm;
      FromChars($csubject);
      $convertstr = $csubject;
 @@ -70,11 +79,19 @@
      liveimage_resize();
      $myname = $FORM{'guestname'};
      uri_unescape($myname);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +         $myname = decode_utf8($myname);
 +    }
      $myname =~ s/[\r\n]//gsm;
      FromChars($myname);
      ToHTML($myname);
      ToChars($myname);
      $myname = Censor($myname);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +        $csubject = encode_utf8($csubject);
 +        $message = encode_utf8($message);
 +        $myname = encode_utf8($message);
 +    }
      print "Content-type: application/x-www-form-urlencoded\n\n"
        or croak "$croak{'print'} content-type";
      print qq~$csubject|$message|$myname~ or croak "$croak{'print'}";
 @@ -87,6 +104,9 @@
      $FORM{'message'} =~ s/\r//gxsm;
      $message = $FORM{'message'};
      uri_unescape($message);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +        $message = decode_utf8($message);
 +    }
      $message =~ s/\[ch8203\]//igsm;
      $message =~ s/\​//igsm;
      FromChars($message);
 @@ -111,6 +131,9 @@
      $message  = Censor($message);
      $csubject = $FORM{'subject'};
      uri_unescape($csubject);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +        $csubject = decode_utf8($csubject);
 +    }
      $csubject =~ s/[\r\n]//gsm;
      FromChars($csubject);
      $convertstr = $csubject;
 @@ -143,6 +166,9 @@

      liveimage_resize();

 +    if ( $yymycharset ne 'UTF-8' ) {
 +        $messageblock = encode_utf8($messageblock);
 +    }
      print "Content-type: application/x-www-form-urlencoded\n\n"
        or croak "$croak{'print'} content-type";
      print qq~$messageblock\n~ or croak "$croak{'print'} messageblock";
 @@ -152,9 +178,12 @@

  sub DoLiveCal {
      LoadLanguage('EventCal');
 -    $FORM{'message'} =~ s/\r//gxsm;
      $message = $FORM{'message'};
      uri_unescape($message);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +        $message = decode_utf8($message);
 +    }
 +    $message =~ s/\r//gxsm;
      $message =~ s/\[ch8203\]//igsm;
      $message =~ s/\​//igsm;
      FromChars($message);
 @@ -181,6 +210,9 @@
      CountChars();
      $myname = $FORM{'guestname'};
      uri_unescape($myname);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +        $myname = decode_utf8($myname);
 +    }
      $myname =~ s/[\r\n]//gsm;
      FromChars($myname);
      ToHTML($myname);
 @@ -198,6 +230,12 @@
      $mybtime   = stringtotime(qq~$d_mon/$d_day/$d_year~);
      $mybtimein = timeformat($mybtime);
      $cdate     = dtonly($mybtimein);
 +    if ( $yymycharset ne 'UTF-8' ) {
 +        $message = encode_utf8($message);
 +        $myname = encode_utf8($myname);
 +        $cdate = encode_utf8($cdate);
 +        $txt_icon = encode_utf8($txt_icon);
 +    }
      print "Content-type: application/x-www-form-urlencoded\n\n"
        or croak "$croak{'print'} content-type";
      print qq~$message|$myname|$cdate|$txt_icon|$mycal_type~
  



To be continued on next post...