First of all, I talk about my stage. I am using the SAP RFC library in YII2 where I am importing an SAP ERP table into my PHP program.
The problem is that when printing a variable that contains accents is not printing them correctly, it puts something like this 'librer # a'. When I see the format of the variable with mb_detect_encoding()
it appears to me that it is of the ASCII type, I do not know if this helps in anything. I already tried with utf8_encode()
and meta.
Any recommendation?
At the moment I only have in mind to do this on the side of ABAP, which has worked for me but it is unnecessary since it would be best to fix it on the PHP side.
REPLACE ALL OCCURRENCES OF REGEX:
'[á]' IN wa_header-justif WITH 'á',
'[é]' IN wa_header-justif WITH 'é',
'[í]' IN wa_header-justif WITH 'í',
'[ó]' IN wa_header-justif WITH 'ó',
'[ú]' IN wa_header-justif WITH 'ú'.
Thanks in advance!