Closed alesf closed 2 years ago
Thanks for the report @alesf!
Ill have a patch out shortly 👍
Hmmm, I'm actually not able to reproduce this -- is the editor you're using not able to view the utf8 characters?
Lines are rendered fine in my Laravel application using your example John Hønry
:
I investigated further and found the issue.
It was a bit convoluted issue at my part.
I have some binary data in my log file and I had to do | strings
conversion of the log file to read it and I completely missed that strings
command uses 7 bit encoding for formatting. When used with -e S
everything works like it should.
I'm sorry for wasting your time.
No worries @alesf! Thanks for reporting back, I appreciate it 🙏
I have broken lines of code in log because special characters in object names are not encoded properly. For example: Log message for fictional user
John Hønry
produces log messageproduction.INFO: Object with name [John H
I don't know what would be the best way to fix this. Maybe transliteration?
iconv("UTF-8", "ISO-8859-1//TRANSLIT", $event->getLogMessage());
or simplyutf8_decode($event->getLogMessage())
?https://github.com/DirectoryTree/LdapRecord-Laravel/blob/e5a2b9bc8e17eb906dc3b1c1aeeee2b29a9fd16f/src/LdapAuthServiceProvider.php#L88