News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

error encoding

Started by inter, November 19, 2011, 08:11:34 AM

Previous topic - Next topic

inter

sorry my english
error encoding news block
UTF8, SMF 2.0.1
see a screenshot
Sorry for my English

Suki

Can you provide more details?

post the steps to reproduce this please.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

inter

Instead Russian letters sometimes appear question marks  :)
Sorry for my English

emanuele

Can you post here the text of the news you wrote enclosed within code tags?

put the text here

Thank you! :)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

inter

[b][url=http://tiraspol.me/index.php?topic=36.0]Группы пользователей[/url][/b]
[b][url=http://tiraspol.me/index.php?topic=53.0]Новости форума[/url][/b]
[b][url=http://tiraspol.me/index.php?topic=55.0]Выгодная работа в ПМР[/url][/b]
[b][url=http://tiraspol.me/index.php?topic=422.0]torrent (beta)[/url][/b]
Sorry for my English

emanuele

In the picture you posted there are images, is it the same?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

inter

words are replaced with questions
and three items are changed to a smiley

???
???
Sorry for my English

emanuele

I can see on your forum these three news properly formatted:

[b][url=http://tiraspol.me/index.php?topic=36.0]Группы пользователей[/url][/b]
[b][url=http://tiraspol.me/index.php?topic=53.0]Новости форума[/url][/b]
[b][url=http://tiraspol.me/index.php?topic=422.0]torrent (beta)[/url][/b]


Is the one missing that causes problems?
[b][url=http://tiraspol.me/index.php?topic=55.0]Выгодная работа в ПМР[/url][/b]


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

inter

can it just me, can I have a bad or hosting it because of the modules?
The problem is that sometimes instead of letters displayed question marks

before a request can be done SET NAMES utf8?

Sorry for my English

emanuele

That's strange.
I'm not good with charsets, so I don't know exactly what is going on...

So apparently when you post your news sometimes this is converted to question marks or before being saved or while being retrieved (before... is it parse_bbc that replace the smiley codes?) and then rendered as smiley when visualized...

Next time it happens, could you please check via phpmyadmin if the value saved in the database is correct or is just a series of question marks? (You have to check in the table smf_settings and search for "news" in the variable field)


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

inter


2: preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Compilation failed: invalid UTF-8 string at offset 0

File: /.../Sources/Load.php
Line: 2145
Sorry for my English

emanuele

It seems you are using mods, could you please attach here your Load.php?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

inter

Sorry for my English

emanuele

Okay, so something is failing during censoring.

Do you have any word listed in the censor?
If so would you mind put them into a text file (both the censored word and the replacement in a format like: "censored text => replacement") and attach it here?
Thanks!


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

inter

there badwords Russian words  ;)
Sorry for my English

inter

yesterday experimenting with sqlite database and found that double-byte characters are Russian forum trims along the wrong
Sorry for my English

emanuele

Are you using sqlite on your on-line forum?


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

inter

Sorry for my English

inter

sqlite problem solved:

Subs.php

find:
    return $smcFunc['substr']($subject, 0, $len) . '...';

replace:
    return mb_substr($subject, 0, $len, 'utf-8') . '...';
Sorry for my English

Arantor

The whole point is that $smcFunc['substr'] is supposed to be a pointer to mb_substr() in the event that UTF-8 is used. Look at Load.php where it's actually defined.

Advertisement: