diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php
index df4f4f951c97b6b3f5c3ed08a38114f3c385f1d9..496c1605cf7d823156b372c9dedb9485533aafa7 100644
--- a/htdocs/compta/bank/graph.php
+++ b/htdocs/compta/bank/graph.php
@@ -54,11 +54,7 @@ llxHeader();
 
 $form = new Form($db);
 
-// If lib forced
-if (! empty($_GET["lib"])) $conf->global->MAIN_GRAPH_LIBRARY=$_GET["lib"];
-
-
-$datetime = time();
+$datetime = dol_now();
 $year = dol_print_date($datetime, "%Y");
 $month = dol_print_date($datetime, "%m");
 $day = dol_print_date($datetime, "%d");
diff --git a/htdocs/core/class/conf.class.php b/htdocs/core/class/conf.class.php
index ecb6820f267776edd1d40454bfbbb76914d52871..d7fae4fa9d6614553852ad5ea2320190fe4e78fd 100644
--- a/htdocs/core/class/conf.class.php
+++ b/htdocs/core/class/conf.class.php
@@ -255,15 +255,15 @@ class Conf
 			$this->$module->dir_temp=$rootfordata."/".$module."/temp";
 		}
 
-		// For mycompany setup
+		// For mycompany storage
 		$this->mycompany->dir_output=$rootfordata."/mycompany";
 		$this->mycompany->dir_temp=$rootfordata."/mycompany/temp";
 
-		// For admin features
+		// For admin storage
 		$this->admin->dir_output=$rootfordata.'/admin';
 		$this->admin->dir_temp=$rootfordata.'/admin/temp';
 
-		// Module user
+		// For user storage
 		$this->user->dir_output=$rootforuser."/users";
 		$this->user->dir_temp=$rootforuser."/users/temp";
 
@@ -309,10 +309,7 @@ class Conf
 		$this->use_javascript_ajax=1;
 		if (isset($this->global->MAIN_DISABLE_JAVASCRIPT)) $this->use_javascript_ajax=! $this->global->MAIN_DISABLE_JAVASCRIPT;
 		// If no javascript_ajax, Ajax features are disabled.
-		if (! $this->use_javascript_ajax)
-		{
-			$this->global->PRODUIT_USE_SEARCH_TO_SELECT=0;
-		}
+		if (! $this->use_javascript_ajax) $this->global->PRODUIT_USE_SEARCH_TO_SELECT=0;
 
 		// conf->currency
 		if (empty($this->global->MAIN_MONNAIE)) $this->global->MAIN_MONNAIE='EUR';
@@ -346,9 +343,6 @@ class Conf
 		$this->mailing->email_from=$this->email_from;
 		if (! empty($this->global->MAILING_EMAIL_FROM))	$this->mailing->email_from=$this->global->MAILING_EMAIL_FROM;
 
-		// Defini MAIN_GRAPH_LIBRARY
-		if (empty($this->global->MAIN_GRAPH_LIBRARY)) $this->global->MAIN_GRAPH_LIBRARY = 'artichow';
-
         if (! isset($this->global->FCKEDITOR_EDITORNAME)) $this->global->FCKEDITOR_EDITORNAME='ckeditor';  // fckeditor to switch
 
         // Format for date (used by default when not found or searched in lang)
diff --git a/htdocs/core/class/dolgraph.class.php b/htdocs/core/class/dolgraph.class.php
index 2ef8ec650c941a0a36baba3590f8d1d3f8f15efb..dfae7d72d177abe3ba0a3f8e08552a3a358504fa 100644
--- a/htdocs/core/class/dolgraph.class.php
+++ b/htdocs/core/class/dolgraph.class.php
@@ -66,15 +66,15 @@ class DolGraph
 	var $Legend=array();
 	var $LegendWidthMin=0;
 
-	var $graph;     		// Objet Graph (Artichow, Phplot...)
+	var $graph;     			// Objet Graph (Artichow, Phplot...)
 	var $error;
 
-	var $library='';		// Par defaut on utiliser PHPlot
+	var $library='artichow';	// Graphic library to use
 
-	var $bordercolor;		// array(R,G,B)
-	var $bgcolor;			// array(R,G,B)
-	var $bgcolorgrid;		// array(R,G,B)
-	var $datacolor;			// array(array(R,G,B),...)
+	var $bordercolor;			// array(R,G,B)
+	var $bgcolor;				// array(R,G,B)
+	var $bgcolorgrid;			// array(R,G,B)
+	var $datacolor;				// array(array(R,G,B),...)
 
 
 	/**
@@ -85,7 +85,6 @@ class DolGraph
 		global $conf;
 		global $theme_bordercolor, $theme_datacolor, $theme_bgcolor, $theme_bgcoloronglet;
 
-
 		// Test si module GD present
 		$modules_list = get_loaded_extensions();
 		$isgdinstalled=0;
@@ -99,15 +98,11 @@ class DolGraph
 			return -1;
 		}
 
-
-		// Defini proprietes de l'objet graphe
-		$this->library=$conf->global->MAIN_GRAPH_LIBRARY;
-
 		$this->bordercolor = array(235,235,224);
 		$this->datacolor = array(array(120,130,150), array(160,160,180), array(190,190,220));
 		$this->bgcolor = array(235,235,224);
 
-		$color_file = DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/graph-color.php";
+		$color_file = DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/graph-color.php';
 		if (is_readable($color_file))
 		{
 			include_once($color_file);
diff --git a/htdocs/core/lib/xcal.lib.php b/htdocs/core/lib/xcal.lib.php
index c0bb1c5eb7bf618ef069e85b92f68d62d4190fda..3b527142ac78baf7c7fa99c65f42dc971b6e3a91 100644
--- a/htdocs/core/lib/xcal.lib.php
+++ b/htdocs/core/lib/xcal.lib.php
@@ -386,7 +386,6 @@ function build_rssfile($format,$title,$desc,$events_array,$outputfile,$filter=''
 
 /**
  * 	Encode for cal export
- * 	string must be encoded in conf->file->character_set_client
  *
  * 	@param		string	$format		vcal or ical
  * 	@param 		string	$string		string to encode
@@ -396,10 +395,8 @@ function format_cal($format,$string)
 {
 	global $conf;
 
-	if ($conf->file->character_set_client == 'ISO-8859-1') $newstring=utf8_encode($string);
-	else $newstring=$string;
+	$newstring=$string;
 
-	// Now newstring is always UTF8 string
 	if ($format == 'vcal')
 	{
 		$newstring=quotedPrintEncode($newstring);
diff --git a/htdocs/install/etape2.php b/htdocs/install/etape2.php
index 8f81e55614cfe8a94d002cd053b9fbc232c4f781..b56c016d7c226cc0c3d424a35eb331cd025ec683 100644
--- a/htdocs/install/etape2.php
+++ b/htdocs/install/etape2.php
@@ -197,10 +197,6 @@ if ($action == "set")
 
                 //print "<tr><td>Creation de la table $name/td>";
                 $requestnb++;
-                if ($conf->file->character_set_client == "UTF-8")
-                {
-                    $buffer=utf8_encode($buffer);
-                }
 
                 dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
                 $resql=$db->query($buffer,0,'dml');
@@ -344,10 +340,6 @@ if ($action == "set")
                     	
                         //print "<tr><td>Creation des cles et index de la table $name: '$buffer'</td>";
                         $requestnb++;
-                        if ($conf->file->character_set_client == "UTF-8")
-                        {
-                            $buffer=utf8_encode($buffer);
-                        }
 
                         dolibarr_install_syslog("Request: ".$buffer,LOG_DEBUG);
                         $resql=$db->query($buffer,0,'dml');
diff --git a/htdocs/master.inc.php b/htdocs/master.inc.php
index 5ee36650668abd0d28ae74eb122180af98e14f8b..d995a768d99fbc7b7b79c96fdfa9bc1c7c6ec556 100644
--- a/htdocs/master.inc.php
+++ b/htdocs/master.inc.php
@@ -56,16 +56,12 @@ $conf->db->dolibarr_main_db_encryption	= $dolibarr_main_db_encryption;
 $conf->db->dolibarr_main_db_cryptkey	= $dolibarr_main_db_cryptkey;
 $conf->file->main_limit_users			= $dolibarr_main_limit_users;
 $conf->file->mailing_limit_sendbyweb	= $dolibarr_mailing_limit_sendbyweb;
-if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type=constant('TEST_DB_FORCE_TYPE');	// For test purpose
-// Identifiant autres
+// Identification mode
 $conf->file->main_authentication		= empty($dolibarr_main_authentication)?'':$dolibarr_main_authentication;
 // Force https
 $conf->file->main_force_https			= empty($dolibarr_main_force_https)?'':$dolibarr_main_force_https;
-// Define charset for HTML Output (can set hidden value force_charset in conf file)
-$conf->file->character_set_client		= strtoupper($force_charset_do_notuse);
 // Cookie cryptkey
 $conf->file->cookie_cryptkey			= empty($dolibarr_main_cookie_cryptkey)?'':$dolibarr_main_cookie_cryptkey;
-
 // Define array of document root directories
 $conf->file->dol_document_root			= array('main' => DOL_DOCUMENT_ROOT);
 if (! empty($dolibarr_main_document_root_alt))
@@ -77,6 +73,8 @@ if (! empty($dolibarr_main_document_root_alt))
 		$conf->file->dol_document_root['alt']=$value;
 	}
 }
+// Force db type (for test purpose)
+if (defined('TEST_DB_FORCE_TYPE')) $conf->db->type=constant('TEST_DB_FORCE_TYPE');
 
 // Multi-Company transverse mode
 $conf->multicompany->transverse_mode = empty($multicompany_transverse_mode)?'':$multicompany_transverse_mode;
@@ -91,7 +89,7 @@ if (! defined('NOREQUIRESOC'))  require_once(DOL_DOCUMENT_ROOT ."/societe/class/
  */
 if (! defined('NOREQUIRETRAN'))
 {
-	$langs = new Translate("",$conf);	// A mettre apres lecture de la conf
+	$langs = new Translate('',$conf);	// A mettre apres lecture de la conf
 }
 
 /*
@@ -107,9 +105,10 @@ if (! defined('NOREQUIREDB'))
 		exit;
 	}
 }
+
 // Now database connexion is known, so we can forget password
-//$dolibarr_main_db_pass=''; 	// Comment this because this constant is used in a lot of pages
-$conf->db->pass='';				// This is to avoid password to be shown in memory/swap dump
+//unset($dolibarr_main_db_pass); 	// We comment this because this constant is used in a lot of pages
+unset($conf->db->pass);				// This is to avoid password to be shown in memory/swap dump
 
 /*
  * Creation objet $user
diff --git a/htdocs/public/members/public_card.php b/htdocs/public/members/public_card.php
index 284b67825e5ec6b81f95346b1e767f8aeada3d6f..b0ae5a8832bd42d5b338f9ab86f5cac1482dd63c 100644
--- a/htdocs/public/members/public_card.php
+++ b/htdocs/public/members/public_card.php
@@ -119,8 +119,8 @@ llxFooterVierge();
 /**
  * Show header for card member
  *
- * @param 	string		$title
- * @param 	string		$head
+ * @param 	string		$title		Title
+ * @param 	string		$head		More info into header
  * @return	void
  */
 function llxHeaderVierge($title, $head = "")
diff --git a/htdocs/public/members/public_list.php b/htdocs/public/members/public_list.php
index cec6d3e1896a7bfb3941aefc6a5209333c31ef4c..1cbc014ce59657ce3809bd472b4fbe8f1418685d 100644
--- a/htdocs/public/members/public_list.php
+++ b/htdocs/public/members/public_list.php
@@ -41,8 +41,8 @@ $langs->load("other");
 /**
  * Show header for member list
  *
- * @param 	string		$title
- * @param 	string		$head
+ * @param 	string		$title		Title
+ * @param 	string		$head		More info into header
  * @return	void
  */
 function llxHeaderVierge($title, $head = "")
diff --git a/htdocs/public/paypal/newpayment.php b/htdocs/public/paypal/newpayment.php
index 3a614385e0a3d911285572bc0668dbdc594d9b18..e098fbf43cc1106d0106ba1475f8c329d189a5f2 100755
--- a/htdocs/public/paypal/newpayment.php
+++ b/htdocs/public/paypal/newpayment.php
@@ -218,25 +218,11 @@ if (GETPOST("action") == 'dopayment')
         dol_syslog("email: $email", LOG_DEBUG);
         dol_syslog("desc: $desc", LOG_DEBUG);
 
-	    /*header("Content-type: text/html; charset=".$conf->file->character_set_client);
-
-	    print '<html>'."\n";
-	    print '<head>'."\n";
-	    print "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=".$conf->file->character_set_client."\">\n";
-	    print '</head>'."\n";
-	    print '<body>'."\n";
-	    print "\n";
-		*/
-
 	    $_SESSION["Payment_Amount"]=$PAYPAL_API_PRICE;
 
 	    // A redirect is added if API call successfull
         print_paypal_redirect($PAYPAL_API_PRICE,$PAYPAL_API_DEVISE,$PAYPAL_PAYMENT_TYPE,$PAYPAL_API_OK,$PAYPAL_API_KO, $FULLTAG);
 
-	    /*print '</body></html>'."\n";
-	    print "\n";
-		*/
-
 		exit;
 	}
 }
diff --git a/htdocs/support/inc.php b/htdocs/support/inc.php
index 7a372fd8ab8f78e6642e4446b87cadd093622136..cac281581ce3aad9b296ea15f125463f885d28c6 100644
--- a/htdocs/support/inc.php
+++ b/htdocs/support/inc.php
@@ -193,7 +193,6 @@ function conf($dolibarr_main_document_root)
 	$conf->db->user = trim($dolibarr_main_db_user);
 	$conf->db->pass = trim($dolibarr_main_db_pass);
 
-	if (empty($conf->file->character_set_client))     	  $conf->file->character_set_client="UTF-8";
 	if (empty($conf->db->dolibarr_main_db_collation)) $conf->db->dolibarr_main_db_collation='latin1_swedish_ci';
 
 	return 1;
@@ -201,7 +200,12 @@ function conf($dolibarr_main_document_root)
 
 
 /**
- *	\brief		Show HTML header
+ *	Show HTML header
+ *
+ *	@param	string	$soutitre	Title
+ *	@param	string	$next		Next
+ *	@param	string	$action		Action
+ *	@return	void
  */
 function pHeader($soutitre,$next,$action='none')
 {