From 8d5ffe02d49a85133f3c5fe0bad42b200c4c17e2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Mar 2009 23:31:27 +0000 Subject: [PATCH] Fix: UTF encoding in memeber card export --- htdocs/adherents/cartes/etiquette.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/adherents/cartes/etiquette.php b/htdocs/adherents/cartes/etiquette.php index 9d8e0e6f6e1..69c43531d67 100755 --- a/htdocs/adherents/cartes/etiquette.php +++ b/htdocs/adherents/cartes/etiquette.php @@ -1,7 +1,7 @@ * Copyright (C) 2003 Jean-Louis Bergamo - * Copyright (C) 2006-2008 Laurent Destailleur + * Copyright (C) 2006-2009 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -62,7 +62,7 @@ if (!isset($annee)){ } // requete en prenant que les adherents a jour de cotisation -$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, ".$db->pdate("d.datefin")." as datefin,"; +$sql = "SELECT d.rowid, d.prenom, d.nom, d.societe, d.datefin,"; $sql.= " d.adresse, d.cp, d.ville, d.naiss, d.email, d.photo,"; $sql.= " t.libelle as type,"; $sql.= " p.libelle as pays"; @@ -80,7 +80,7 @@ if ($result) { $objp = $db->fetch_object($result); // imprime le texte specifique sur la carte - $message=sprintf("%s\n%s\n%s %s\n%s", ucfirst(strtolower($objp->prenom))." ".strtoupper($objp->nom), ucwords(strtolower($objp->adresse)), $objp->cp, strtoupper($objp->ville), ucfirst(strtolower($objp->pays))); + $message=sprintf("%s\n%s\n%s %s\n%s", $objp->prenom." ".$objp->nom, $objp->adresse, $objp->cp, $objp->ville, $objp->pays); $pdf->Add_PDF_card($message,'','',$langs); $i++; } @@ -88,18 +88,18 @@ if ($result) // Output to http strem $pdf->Output($file); - if (! empty($conf->global->MAIN_UMASK)) + if (! empty($conf->global->MAIN_UMASK)) @chmod($file, octdec($conf->global->MAIN_UMASK)); - + $db->close(); clearstatcache(); - + $attachment=true; if (! empty($conf->global->MAIN_DISABLE_FORCE_SAVEAS)) $attachment=false; $filename='tmplabels.pdf'; $type=dol_mimetype($filename); - + if ($encoding) header('Content-Encoding: '.$encoding); if ($type) header('Content-Type: '.$type); if ($attachment) header('Content-Disposition: attachment; filename="'.$filename.'"');