hi Joanna,
while SEC can be easily configured to run in UTF-8 mode by setting the
PERL_UNICODE environment variable, this approach apparently does not work
for UCS-2. One can of course manually add 'binmode' statements for UCS-2
files into SEC code, but doing it just for input files is not enough, since
one might want to use UCS-2 characters in rule files (e.g., regular
expressions with UCS-2 characters) and output files as well. Therefore,
changing the character set once via environment variable (or a global
statement in the header of SEC code) is the best approach, but currently
doesn't seem to be supported by Perl.
I was also briefly thinking of running a UCS-2 to UTF-8 converter via
'spawn' or 'cspawn' action which would allow for SEC to see the file as a
stream of UTF-8 characters. While this approach would work on UNIX systems
and Windows with Cygwin Perl, Strawberry perl does not provide enough
emulation of UNIX system calls for 'spawn' and 'cspawn', and these actions
are enabled only with Cygwin Perl.
kind regards,
risto

2017-08-02 9:21 GMT+03:00 Joanna Christou <ioannachris...@hotmail.com>:

>
> Hi,
>
> We are trying to use Simple Event Correlator via Perl on Windows
> (Strawberry Perl) to do advanced processing of log file. The problem is the
> log file is UCS-2 format and SEC only reads UTF-8 log files. Is there a way
> to make SEC read a UCS-2 log file?
>
> Thanks in advance,
> Joanna Christou
>
>
>
> Sent from my Samsung Galaxy smartphone.
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Simple-evcorr-users mailing list
> Simple-evcorr-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Simple-evcorr-users mailing list
Simple-evcorr-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simple-evcorr-users

Reply via email to