Changeset 367fbf3


Ignore:
Timestamp:
Jan 16, 2008, 9:54:55 PM (13 years ago)
Author:
Alejandro R. Sedeño <asedeno@mit.edu>
Branches:
master, barnowl_perlaim, debian, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
a8d5a39
Parents:
e0ffe77
Message:
Remove a debug message I accidentally left in.
Remove the hours old check_utf8 hackery in favor of actually
marking strings as UTF-8 from the C side.
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • perl/modules/Jabber/lib/BarnOwl/Module/Jabber.pm

    re0ffe77 r367fbf3  
    296296    my $cmd = shift;
    297297    my $jid = new Net::Jabber::JID;
    298     $jid->SetJID(check_utf8(shift));
     298    $jid->SetJID(shift);
    299299    my $password = '';
    300     $password = check_utf8(shift) if @_;
     300    $password = shift if @_;
    301301
    302302    my $uid           = $jid->GetUserID();
     
    479479    }
    480480    else {
    481       $to = check_utf8(shift @ARGV);
     481      $to = shift @ARGV;
    482482    }
    483483
     
    523523    $cmd .= " -t $jwrite_thread" if $jwrite_thread;
    524524    $cmd .= " -s $jwrite_subject" if $jwrite_subject;
    525     queue_admin_msg("$cmd - utf8: ".Encode::is_utf8($cmd));
    526525
    527526    BarnOwl::start_edit_win( Encode::encode_utf8($cmd), \&process_owl_jwrite );
     
    10831082### Helper functions
    10841083
    1085 sub check_utf8
    1086 {
    1087   my $str = shift;
    1088   Encode::_utf8_on($str);
    1089   Encode::_utf8_off($str) unless (Encode::is_utf8($str, 1));
    1090   return $str;
    1091 }
    1092 
    10931084sub j2hash {
    10941085    my $j   = shift;
     
    12251216
    12261217sub resolveConnectedJID {
    1227     my $givenJIDStr = check_utf8(shift);
     1218    my $givenJIDStr = shift;
    12281219    my $givenJID    = new Net::Jabber::JID;
    12291220    $givenJID->SetJID($givenJIDStr);
  • perlconfig.c

    rb7b4565 r367fbf3  
    454454  PUSHMARK(SP);
    455455  for(i=0;i<argc;i++) {
    456     XPUSHs(sv_2mortal(newSVpv(argv[i], 0)));
     456    SV *tmp = newSVpv(argv[i], 0);
     457    SvUTF8_on(tmp);
     458    XPUSHs(sv_2mortal(tmp));
    457459  }
    458460  PUTBACK;
     
    488490{
    489491  SV *cb = (SV*)(e->cbdata);
     492  SV *text;
    490493  unsigned int n_a;
    491494  dSP;
     
    494497    owl_function_error("Perl callback is NULL!");
    495498  }
     499  text = newSVpv(owl_editwin_get_text(e), 0);
     500  SvUTF8_on(text);
    496501
    497502  ENTER;
     
    499504
    500505  PUSHMARK(SP);
    501   XPUSHs(sv_2mortal(newSVpv(owl_editwin_get_text(e), 0)));
     506  XPUSHs(sv_2mortal(text));
    502507  PUTBACK;
    503508 
Note: See TracChangeset for help on using the changeset viewer.