Recent Topics

1 Sep 30, 2006 20:47    

Hello everyone,

After doing some search in the php files, i found out that the function htmltrans() handles translation.

If you put the following code, to htmltrans, your site will display characters normally.

[code]
/path_to_evo/conf/_formatting.php:

do not forget to put "&#" before the numbers!

it should look like this :

'&#xxx;' => '&#yyy;',

$b2_htmltranswinuni = array(
'208;' => '286;',
'240;' => '287;',
'222;' => '350;',
'254;' => '351;',
'220;' => '220;',
'252;' => '252;',
'214;' => '214;',
'246;' => '246;',
'199;' => '199;',
'221;' => '304;',
'253;' => '305;'
);
[/code]

2 Feb 04, 2007 14:45

i did the things you said. However it didnt solve my problem. i changed my blog and user locale to TR but turkish characters appear as ???? after i post them. i have just upgraded from 0.9.2 to 1.8.7 . i can view turkish characters in my older posts that i sent before the upgrade. Can anynody help me? thanks.

3 Feb 04, 2007 15:40

another interesting thing is that i can view turkish characters correctly on preview of a post.

4 Feb 04, 2007 15:49

Can you please find and post the function named "Convert_Chars" or something similar in blog folder?

most likely it'd be in misc.inc.php

5 Feb 04, 2007 15:50

another problem is that comments that include turkish characters give an error of :

MySQL error!

Illegal mix of collations (latin5_turkish_ci,COERCIBLE) and (latin1_swedish_ci,IMPLICIT) for operation 'like'(Errno=1267)

Your query: Check URL against antispam blacklist

SELECT aspm_string

FROM evo_antispam

WHERE 'şğ' LIKE CONCAT('%',aspm_string,'%')

LIMIT 0, 1

6 Feb 04, 2007 15:53

What is your blog address?

7 Feb 04, 2007 15:59

"Yumurcak" wrote:

Can you please find and post the function named "Convert_Chars" or something similar in blog folder?

most likely it'd be in misc.inc.php

function convert_chars( $content, $flag='html' )
{
global $b2_htmltrans, $b2_htmltranswinuni, $evo_charset;

// Convert highbyte non ASCII/UTF-8 chars to urefs:
if( ! in_array($evo_charset, array('utf-8', 'gb2312', 'windows-1251') ) )
{ // This is a single byte charset
$content = preg_replace_callback(
'/[\x80-\xff]/',
create_function( '$j', 'return "&#".ord($j[0]).";";' ),
$content);
}

// Convert Windows CP1252 => Unicode (valid HTML)
// TODO: should this go to input conversions instead (?)
$content = strtr( $content, $b2_htmltranswinuni );

if( $flag == 'html' )
{ // we can use entities
// Convert & chars that are not used in an entity
$content = preg_replace('/&(?![#A-Za-z0-9]{2,20};)/', '&', $content);
}
else
{ // unicode, xml...
// Convert & chars that are not used in an entity
$content = preg_replace('/&(?![#A-Za-z0-9]{2,20};)/', '&', $content);

// Convert HTML entities to urefs:
$content = strtr($content, $b2_htmltrans);
}

return( $content );
}

8 Feb 04, 2007 20:06

i solved the problem. It seems that there is no character problem for turkish now :)

Set $evo_charset to 'iso-8859-9' and $db['connection_charset'] to 'latin5_turkish_ci' in /conf/_locales.php.

I also did the things said in the first message above.


Form is loading...