Changeset 1329


Ignore:
Timestamp:
Feb 1, 2010, 12:36:21 AM (9 years ago)
Author:
Daniel Kahn Gillmor
Message:

jpdd: convert unicode to ISO-8859-1 for pdf output, since that is all fpdf can handle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/jpdd/class.jpdd.pdf.php

    r963 r1329  
    9999          if (count($l)) {
    100100                $this->SetFont($this->_font, 'B', $this->_body_fsize);
    101                 $this->Cell($this->_page_width - 2*$this->_margin, $this->_body_fsize * $this->_line_sp, $title, 0, 1);
     101                $this->Cell($this->_page_width - 2*$this->_margin, $this->_body_fsize * $this->_line_sp, iconv("UTF-8", "ISO-8859-1//TRANSLIT", $title), 0, 1);
    102102                $this->SetFont($this->_font, '', $this->_body_fsize);
    103103                reset($l);
    104104                while (list(,$p) = each($l)) {
    105105                  $this->SetX($this->GetX() + $this->_body_fsize * $this->_line_sp);
    106                   $this->Cell($this->_page_width - 2*$this->_margin, $this->_body_fsize * $this->_line_sp, $f($p), 0, 1);
     106                  $this->Cell($this->_page_width - 2*$this->_margin, $this->_body_fsize * $this->_line_sp, iconv("UTF-8", "ISO-8859-1//TRANSLIT", $f($p)), 0, 1);
    107107                }
    108108          }
     
    149149                $this->SetXY($xpos, $ypos);
    150150                $this->Rect($this->GetX(), $this->GetY(), $cellwid, $linehi);
    151                 $x = html_entity_decode($a->getTitle());
     151                $x = iconv("UTF-8", "ISO-8859-1//TRANSLIT", html_entity_decode($a->getTitle()));
    152152                if ('' != $x)
    153153                  $this->fitSingleLine($cellwid - $linehi/2, $linehi, $x, $this->_font, '', $this->_body_fsize, 'L');
     
    156156
    157157                $this->Rect($this->GetX(), $this->GetY(), $cellwid, $linehi);
    158                 $x = html_entity_decode($a->getAffiliationString());
     158                $x = iconv("UTF-8", "ISO-8859-1//TRANSLIT", html_entity_decode($a->getAffiliationString()));
    159159                if ('' != $x)
    160160                  $this->fitSingleLine($cellwid - $linehi/2, $linehi, $x, $this->_font, '', $this->_body_fsize, 'L');
     
    229229                  $rmtxt = join('/', array_map(create_function('$w', 'return html_entity_decode($w->getAssignedRoomTitle());'), $ws));
    230230                  $this->Ln();
    231                   $this->Cell($cellwid, $linehi, $p->getReversedName(), 0, 0, 'L', $fill);
     231                  $this->Cell($cellwid, $linehi, iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $p->getReversedName()), 0, 0, 'L', $fill);
    232232                  $this->Cell($cellwid, $linehi, $wstxt, 0, 0, 'L', $fill);
    233233                  $this->Cell($rmwid, $linehi, $rmtxt, 0, 0, 'L', $fill);
     
    271271                        $peop = array_shift($peops);
    272272                        $this->SetXY($this->_margin + $col*($colwid + $gutter), $this->_margin + ($row+1)*$linehi);
    273                         $this->fitCell($colwid/2, $linehi, $peop['last_name'].', '.$peop['first_name'].' '.$peop['middle_name']);
     273                        $this->fitCell($colwid/2, $linehi, iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $peop['last_name'].', '.$peop['first_name'].' '.$peop['middle_name']));
    274274                        $this->fitCell($colwid/3, $linehi, $jpdd->isEmpty($peop['workshop']) ? ' ' : $peop['workshop']);
    275275                        $this->fitCell($colwid/6, $linehi, $jpdd->isEmpty($peop['room']) ? ' ' : $peop['room'], 0,0,'R');
Note: See TracChangeset for help on using the changeset viewer.