diff --git a/html/do.php b/html/do.php
index b3d6a4039..e19f6f910 100644
--- a/html/do.php
+++ b/html/do.php
@@ -95,6 +95,7 @@ if ( DEBUGNOALYSS > 1 ) {
\Noalyss\Dbg::display_size();
\Noalyss\Dbg::display_request();
\Noalyss\Dbg::display_global();
+ echo "encoding";echo mb_internal_encoding();
} //<--- if DEBUG
$g_parameter=new Noalyss_Parameter_Folder($cn);
diff --git a/include/ajax/ajax_ledger.php b/include/ajax/ajax_ledger.php
index d5d042c7d..eba232337 100644
--- a/include/ajax/ajax_ledger.php
+++ b/include/ajax/ajax_ledger.php
@@ -564,7 +564,7 @@ switch ($action) {
break;
case 'note_refresh':
$acc_operation_note= Acc_Operation_Note::build_jrn_id($jr_id);
- echo substr($acc_operation_note->getNote()??"",0,120);
+ echo mb_substr($acc_operation_note->getNote()??"",0,120);
return;
case "rmsup":
diff --git a/include/class/acc_ledger_search.class.php b/include/class/acc_ledger_search.class.php
index 60ef7d600..cbda5d708 100644
--- a/include/class/acc_ledger_search.class.php
+++ b/include/class/acc_ledger_search.class.php
@@ -984,7 +984,7 @@ print $html;
// Note
$r.='
';
$r.='';
- $r.= substr($row['n_text']??"",0,120);
+ $r.= mb_substr($row['n_text']??"",0,120);
$r.='';
$r.='';
$r.=' | ';
diff --git a/include/class/fiche.class.php b/include/class/fiche.class.php
index 8ea43a022..933481126 100644
--- a/include/class/fiche.class.php
+++ b/include/class/fiche.class.php
@@ -528,14 +528,14 @@ class Fiche
if ( $p_array["av_text".ATTR_DEF_QUICKCODE] =="")
{
if ( ! empty( $p_array['av_text'. ATTR_DEF_ACCOUNT])) {
- $base_acc=substr($p_array['av_text'. ATTR_DEF_ACCOUNT]??"",0, 3);
+ $base_acc=mb_substr($p_array['av_text'. ATTR_DEF_ACCOUNT]??"",0, 3);
}else {
$base_acc=$this->cn->get_value("select substr(fd_class_base,1,2) from fiche_def where fd_id = $1",
[$p_fiche_def]);
}
$p_array["av_text".ATTR_DEF_QUICKCODE]=sprintf("%s%s"
, $base_acc
- , substr($p_array["av_text".ATTR_DEF_NAME], 0, 4)
+ , mb_substr($p_array["av_text".ATTR_DEF_NAME], 0, 4)
);
}
$sql=sprintf("select insert_quick_code(%d,'%s')", $fiche_id,
diff --git a/include/template/operation_exercice-input_source.php b/include/template/operation_exercice-input_source.php
index 47bf3a288..38abbbcec 100644
--- a/include/template/operation_exercice-input_source.php
+++ b/include/template/operation_exercice-input_source.php
@@ -62,7 +62,7 @@ global $g_parameter;
$i = 0;
foreach ($avail as $r) {
$array[$i]['value'] = $r['dos_id'];
- $array[$i]['label'] = sprintf("%s %s (%s)",$r['dos_id'],$r['dos_name'],substr($r['dos_description']??"",0,50));
+ $array[$i]['label'] = sprintf("%s %s (%s)",$r['dos_id'],$r['dos_name'],mb_substr($r['dos_description']??"",0,50));
$i++;
}
$sAvail = new ISelect('dos_id');