|
|
|
|
|
|
|
Re: Problems charset [message #164421 is a reply to message #164419] |
Fri, 04 February 2011 07:47   |
|
Цитата:What is 5075?
<?php
/**
* copyright : (C) 2001-2010 Advanced Internet Designs Inc.
* email : forum(at)prohost(dot)org
* $Id: nntp.inc 5075 2010-11-15 17:59:45Z naudefj $
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; version 2 of the License.
**/
Цитата:it is no related to the current topic
I have same problem.
|
|
|
|
Re: Problems charset [message #164431 is a reply to message #164423] |
Fri, 04 February 2011 21:35   |
|
Цитата:Please use the provided workaround
I do not quite understand you - http://translate.google.ru:)
I'll try to describe the problem.
Determination of coding messages. In version 3.00. File nntp.inc v 1.86. Function parse_msgs (). If no encoding is specified (outlook express does so), "$ charset = 'koi8-r'";. Everything worked.
Version 3.02. Where the definition of encoding? Where parse_msgs ()? (found), things have changed! What do I do? If the encoding is not specified where to insert "$ charset = 'koi8-r'"?
|
|
|
|
|
|
Re: Problems charset [message #164444 is a reply to message #164443] |
Sat, 05 February 2011 23:39   |
|
Цитата:So, what are you saying, the body was correctly decoded but the subject wasn't?
Yes
Цитата:BTW: Your link doesn't work. It points to an empty 3.0.0 forum.
Downgrade
|
|
|
Re: Problems charset [message #164488 is a reply to message #164444] |
Wed, 09 February 2011 21:45   |
|
I partially solved the problem.
The file scripts_common.inc
if (function_exists('iconv_mime_decode')) {
return iconv_mime_decode(trim($val), 2);
to
if (function_exists('iconv_mime_decode')) {
return iconv_mime_decode(trim($val), 2, $GLOBALS['CHARSET']);
In file mime_decode.inc
function fetch_useful_headers() {
include_once "detect_cyr_charset.php"; // include detect charset script (in attachment)
// if script return charset ISO - nothing encoding
if ((detect_cyr_charset($this->headers['subject'])=="i")) {
$this->subject = htmlspecialchars(trim($this->headers['subject']));
}
elseif((detect_cyr_charset($this->headers['subject'])=="m")) // if charset MAC - i dont know
{ $this->subject = "Decode subject faild :(";
}
else
{ $this->subject = decode_string((htmlspecialchars(trim($this->headers['subject']))), $this->headers['content-transfer-encoding'], $this->headers['__other_hdr__']['content-type']['charset']);
}
I do not quite understand how this "Hindu Code" works. But it works! 
About 80% "$ this-> headers ['subject']" is decoded normally.
There is a way to make it better?
[Updated on: Wed, 09 February 2011 22:15] Report message to a moderator
|
|
|
|
|
|