Hallo Kristis Makris,
Tuesday, December 12, 2006, 5:30:02 PM, haben Sie folgendes geschrieben:
>> $request->{ original_log_message } = $original_log_message;
>> $request->{ original_log_message } = decode("cp850", $request->{
>> original_log_message });
> Do you:
> use Encode;
> ?
Of course, just forgot to mention that.
> Also, do you know how we could dynamically detect that 'cp850' is what
> we should decode ? Is this something we could pick-up from the
> environment variables ?
At least you can get it with the system function chcp and parsing the
output, there of course are better ways using the Windows API but I
don't know of any environment variables at the moment, at least a
"set" in my Windows console didn't show anything like that.
The output of chcp is something like:
Aktive Codepage: 850.
Maybe it's possible to filter this output with a regular expression,
but in the worst case this output is already in a codepage one has
problems with filtering.
> You talked about the Daemon reading from STDIN.
It's in the sub process_connection, just didn't mention because the
lines appear only once in the whole package.
> I know we also read the
> log message as the output of svnlook. Should something like this also be
> present in the glue ? It seems as if this should be executed on the glue
> side, since the machine executing the hooks could be different (and
> using a different codepage) than the one running the daemon.
Maybe, I'm not that faamiliar with SCMBug internals neither Perl.
Your comment says:
# Processes an incoming connection from an integration glue
In my oppinion there shouldn't be a problem if you directly transfer
the data via the glue without any parsing or stuff like that which
needs the proper encoding of the data to function properly. My added
line encodes the data, if I properly understood the sub, after
transferring from the glue and everything seem to be fine.
In general it should be a good idea to encode every data you get from
outside Perl if yo have a clue of what you are getting. There are some
discussions about that with Perls DBD/DBI package and situations where
the database can know which character encoding the data has which will
be transferred. It seems that an encoding and/or testing for UTF-8 and
stuff like that is recommended.
Mit freundlichen Grüßen,
Thorsten Schöning
--
Thorsten Schöning
AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig
eMail [EMAIL PROTECTED]
Telefon Potsdam...0331-743881-0
Telefon Mobil.....0178-8 9468-04
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users