# syslog() on Windows for wide character

- Thread: https://externals.io/message/46947
- Original archive: https://news-web.php.net/php.internals/46947
- Started by KITAZAKI Shigeru on 2010-02-05T07:30:20+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #46947 — KITAZAKI Shigeru — 2010-02-05T07:30:20+00:00

URL: https://externals.io/message/46947#46947

Hi,

We've improved a patch which makes `syslog()` to send UTF-8 strings to event
log on Windows. This patch introduces a new INI directive to switch to the
new behavior; the directive name is 'syslog_widechar'. This is a optional
feature only for Windows, and does not conflict current behavior or any
other settings.

More detailed information and the patch are here:
http://developer.cybozu.co.jp/oss/2010/02/php-syslog-patc.html

And many thanks to your suggestions in the thread of 'adding GB18030
support for mbstring'.

2010/2/1 Pierre Joye wrote:
> > […]
> It has to be optional. Maybe a mbstring.syslog* option to set a given
> encoding for the syslog functions.

2010/2/1 Moriyoshi Koizumi wrote:
> > […]
> It seems this doesn't relies on any mbstring settings, but just
> changed `syslog()` to take strings encoded in UTF-8 instead of the
> system's default encoding.  It'd look good to me if it had a new flag
> causing `syslog()` to switch to the new behaviour.

Regards,
KITAZAKI Shigeru

---

## #46948 — Pierre Joye — 2010-02-05T10:00:32+00:00

URL: https://externals.io/message/46947#46948 · In reply to: #46947

hi,

Thanks for the update :)

I still think that it should follow mbstring logic and API. Doing so
will provide 100% backward compatibility. If an application define
this setting as UTF-8 but some modules are not implemented with UTF-8
in mind, then the log may be broken.

Cheers,

2010/2/5 KITAZAKI Shigeru <shigeru_kitazaki@cybozu.co.jp>:
> Hi,
>
> We've improved a patch which makes `syslog()` to send UTF-8 strings to event
> log on Windows. This patch introduces a new INI directive to switch to the
> new behavior; the directive name is 'syslog_widechar'. This is a optional
> feature only for Windows, and does not conflict current behavior or any
> other settings.
>
> More detailed information and the patch are here:
> http://developer.cybozu.co.jp/oss/2010/02/php-syslog-patc.html
>
> And many thanks to your suggestions in the thread of 'adding GB18030
> support for mbstring'.
>
> 2010/2/1 Pierre Joye wrote:
> > […]
>
> 2010/2/1 Moriyoshi Koizumi wrote:
> > […]
>
> Regards,
> KITAZAKI Shigeru
>
> --
> 
> 
>
>



-- 
Pierre

@pierrejoye | http://blog.thepimp.net | http://www.libgd.org
