Announcement

Collapse
No announcement yet.

Replace message encoding (+)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replace message encoding (+)

    I need replace email message from win1251 to koi8r encoding.
    In use perl im create file cyrillic.h, here is content:

    Code:
    $tab{"KOI"}="\377ţ";
    $tab{"WIN"}="Ũ\377";
    
    sub convert {
    	my($Src, $Dst,  $Buf) = @_;
        local $Result=$Buf;
        eval "\$Result =~ tr/$tab{$Src}/$tab{$Dst}/";
        return $Result;
    }
    
    1
    Were heed im use:

    $touser=convert('WIN','KOI', $touser);
    $subject=convert('WIN','KOI', $subject);
    $messagebody=convert('WIN','KOI', $messagebody);

    How can create this with PHP

    Thx
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Working...
X