navigation  interaction  search

 other resources

Changeset 398

Show
Ignore:
Timestamp:
05/15/08 13:23:14
Author:
brieb
Message:
  • Fixed #261 - PDF printing of special characters (specifically wacky currency symbols)
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/phpbms/include/common_functions.php

    r384 r398  
    513513 
    514514function htmlQuotes($string){ 
    515         return htmlspecialchars($string,ENT_COMPAT,"UTF-8"); 
    516 
     515 
     516        global $sqlEncoding; 
     517        if(!isset($sqlEncoding)) 
     518                $sqlEncoding = ""; 
     519                 
     520        switch ($sqlEncoding){ 
     521         
     522                case "latin1": 
     523                        $encoding = "ISO-8859-15"; 
     524                        break; 
     525                 
     526                case "utf8": 
     527                default: 
     528                        $encoding = "UTF-8"; 
     529                        break; 
     530         
     531        }//endswitch 
     532         
     533        return htmlspecialchars($string, ENT_COMPAT, $encoding); 
     534 
     535
     536 
    517537 
    518538 
  • trunk/phpbms/modules/bms/report/invoices_pdf_class.php

    r384 r398  
    440440                                                        if($value == "·") 
    441441                                                                $value = " "; 
    442                                                                  
    443442                                                        if($column->fieldname == $this->lineitems[count($this->lineitems)-1]->fieldname) 
    444443                                                                $ln = 2; 
     
    550549                                switch($column->fieldname){ 
    551550                                        case "shipping": 
    552                                         case "discountamount": 
     551                                        case "discountamount":                                  
    553552                                                if($this->invoicerecord[$column->fieldname]) 
    554553                                                        $pdf->Cell($column->size, 0.18, $column->title, 1, 0, $column->align, 1); 
Copyright © 2006-2007 Kreotek, LLC. All Rights reserved.