There's no way...

I've tried some encodings and allways got the same log msg...

I've added some lines to get log msgs for distinct encodings:

    $request->{ original_log_message } = $original_log_message;
    $request->{ original_log_message } = decode("UTF-8",$request->{original_log_message });

    logmsg( $DAEMON_LOG_ACTIVITY, $original_log_message );

    logmsg( $DAEMON_LOG_ACTIVITY, decode("UTF-8",$original_log_message) );
    logmsg( $DAEMON_LOG_ACTIVITY, decode("iso8859-1",$original_log_message) );
    logmsg( $DAEMON_LOG_ACTIVITY, decode("iso8859-15",$original_log_message) );


And this is the log I've got:


Tue Dec 12 22:09:55 2006 127.0.0.1:32829 Processing connection from localhost.localdomain
Tue Dec 12 22:09:55 2006 127.0.0.1:32829 A?\195?\177ado una linea a fich2 y pruebo el tema de los acentos cami?\195?\179n, AL?\195?\129, ?\195?\177i?\195?\177li


Tue Dec 12 22:09:55 2006 127.0.0.1:32829 A?\195?\177ado una linea a fich2 y pruebo el tema de los acentos cami?\195?\179n, AL?\195?\129, ?\195?\177i?\195?\177li


Tue Dec 12 22:09:55 2006 127.0.0.1:32829 A?\195?\177ado una linea a fich2 y pruebo el tema de los acentos cami?\195?\179n, AL?\195?\129, ?\195?\177i?\195?\177li


Tue Dec 12 22:09:55 2006 127.0.0.1:32829 A?\195?\177ado una linea a fich2 y pruebo el tema de los acentos cami?\195?\179n, AL?\195?\129, ?\195?\177i?\195?\177li


Tue Dec 12 22:09:55 2006 127.0.0.1:32829 Processing an 'activity_commit' for bug id '26' from SCM user 'root'
Tue Dec 12 22:09:56 2006 127.0.0.1:32829 Connection processed


It seems it comes "corrupted" from STDIN and encode treats each character in ?\195?\179 (for example) as a ascii character... don't you think so?

PD: Forget my previous msg. I said the msg was empty in RT but this was becouse I made a mistake in the code... I always get the same corrupted msg in RT (the same that is showed in the log)
PD: If I try es_ES or similar encodings I get the following error in the log:
Unknown encoding 'es_ES' at /usr/share/scmbug/lib/Scmbug/Daemon/Daemon.pm line 478

I think this is ok since es_ES is not a char encoding...



Kristis Makris wrote:
On Tue, 2006-12-12 at 19:42 +0100, Javier Lafuente wrote:
  
I've tried with "es_ES.UTF-8" and with "UTF-8" and I get an empty log
in RT bug view
    

Hm....

LANGUAGE=es_ES.UTF-8:[EMAIL PROTECTED]:es_ES:es:en_GB:en

How about:

decode("es_ES"
decode("[EMAIL PROTECTED]"
decode("es"


  
In svn log I get the correct message in all my test commits:

mistral:~/kk/svntest_co/test_rep_a/trunk# svn log fich2
------------------------------------------------------------------------
r6 | root | 2006-12-12 19:38:55 +0100 (mar, 12 dic 2006) | 2 lines

bug 26: Añado una linea a fich2 y pruebo el tema de los acentos
camión, ALÁ, ñiñl

------------------------------------------------------------------------
r5 | root | 2006-12-12 19:35:58 +0100 (mar, 12 dic 2006) | 2 lines

bug 26: Añado una linea a fich2 y pruebo el tema de los acentos
camión, ALÁ, ñiñli

------------------------------------------------------------------------
r4 | root | 2006-12-12 19:33:28 +0100 (mar, 12 dic 2006) | 2 lines

bug 26: Añado una linea a fich2 y pruebo el tema de los acentos
camión, ALÁ, ñiñli

------------------------------------------------------------------------
r3 | root | 2006-12-10 18:26:09 +0100 (dom, 10 dic 2006) | 2 lines

bug 26: Añado una linea a fich2 y pruebo el tema de los acentos
camión, ALÁ, ñiñli

------------------------------------------------------------------------
r1 | root | 2006-12-07 02:05:32 +0100 (jue, 07 dic 2006) | 2 lines

import de repo

------------------------------------------------------------------------
mistral:~/kk/svntest_co/test_rep_a/trunk#  


Kristis Makris wrote: 
    
On Tue, 2006-12-12 at 19:03 +0100, Javier Lafuente wrote:
  
      
But my problem is that I work in UTF-8... What have I need to add?
Something like?

$request->{ original_log_message } = $original_log_message;
$request->{ original_log_message } = decode("UTF-8", $request->{ original_log_message });
    
        
Try:
$request->{ original_log_message } = decode("es_ES.UTF-8",
$request->{original_log_message });

http://perldoc.perl.org/Encode.html


  
      


  
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users

Reply via email to