• Welcome to Simple Machines Community Forum. Please login or sign up.
October 22, 2021, 09:11:45 AM

News:

SMF 2.1 RC4 has been released! Try it out and help us test! :) Read more.


Wrong parsing of UTF characters in board names categories and posts in 1.1 RC2

Started by spiros, December 31, 2005, 07:03:12 PM

Previous topic - Next topic

spiros


GravuTrad

We look at a sort of problem like this in the french translation with the email notification, could it be the same problem?

we obtain this in the mails...:

QuoteUne r=E9ponse a =E9t=E9 post=E9e dans un fil de discussion que vous
surveillez par GravuTrad.

Voir la r=E9ponse au=A0: http://www.gravure-et-traductions.com/Testsmf/index.php=3Ftop
ic=3D1.new;topicseen#new
D=E9sabonnement =E0 ce fil de discussion en cliquant ici: http://www.gravure-et-traductions.com/Testsmf/index.php=3Fact
ion=3Dnotify;topic=3D1.0
D'autres r=E9ponses peuvent avoir =E9t=E9 post=E9es entre temps, mais vous
ne recevrez pas d'autre notification tant que vous ne lirez pas ce fil de
discussion.

Cordialement,
L'=E9quipe My Community.

Like you can see entities are not well seen, but not the same things in the same inboxes (for example caramail do this example above but hotmail read well....)

Could it be an issue of the problem you are talking in this post?
On a toujours besoin d'un plus petit que soi! (Petit!Petit!)


Think about Search function before posting.
Pensez à la fonction Recherche avant de poster.

spiros

Do you use UTF encoding? These problems seem to appear only when using UTF.

GravuTrad

On a toujours besoin d'un plus petit que soi! (Petit!Petit!)


Think about Search function before posting.
Pensez à la fonction Recherche avant de poster.

spiros

Hello Compuart and Grudge,

Any updates on the UTF issue?

I do not mean to inflict any pressure but I have a UTF portal on the standby and I would prefer to use SMF rather than a different forum...

So, if possible, I would really appreciate it if you could give us an estimate of the time needed to release any relevant patches.

scripter

Quote from: spiros on January 12, 2006, 05:51:39 AM
This is interesting. It does the same to the Greek character Π.

I found the problem.
This is the error when this function run

// Put it back together!
if (!$previewing)
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />', "\xA0" => '&nbsp;'));
else
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\xA0" => '&nbsp;'));


it try to replace the code \xA0 to the HTML of Non break space &nbsp;

When I change to the normal space (press the space bar) like this
"\xA0" => ' '

The problem fixed

spiros

scripter,

You mean you change the instances of

"\xA0" => '&nbsp;'

to

"\xA0" => ' '

I tried it. But it did not fix the problem with the Greek Π.

Logue

If it is done in Japanese, a problem will occur ...

だ -> nbsp;
頻 -> 馮bsp;?

// Put it back together!
if (!$previewing)
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />'));
else
$message = strtr(implode('', $parts), array('  ' => '&nbsp; '));


Probably, I think that it is because \xA0 is contained in some characters. When the portion of \xA0 was deleted, it stopped then, generating garbled characters on SQL data at least. (Thanks to Turkey)
http://forum.logue.tk/index.php/topic,95.0.html

Isn't it hit by the same trouble in the languages (Japanese, Chinese, Korean, etc.) using the kanji?

Du!

I use utf-8 and I have the same problem with russian "P" on my SMF 1.1 RC2 forum.
Nothing above did not fix it.
Any idea o update for this problem?
Thanks

agridoc

Hi Du!

I have noticed this problem in http://www.simplemachines.org/community/index.php?topic=63235.msg440773#msg440773 pointing that there might be a correlation.

I use as a test string for multilingual the catalog of the language specific support boards of SMF, so it is by luck that I noticed this problem with Russian.

There might be problem with other languages too but that must be found by people using them.

I also had a request for multilingual in a more simple approach in  Multilingual in SMF 1.1RC2 without UTF for Greek and other languages? that might interest some of the Russian community, as I believe many use windows-1251 and not UTF-8.

Compuart is looking after these two cases but no solution has yet appeared.
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF - Greeklish to Greek mod
Δeν αφιερώνω χρόνο για μηνύματα σε greeklish.

BadCluster

I noticed the following 2 problems in 1.1 RC2.

The 1st is about making categories and subforums with greek fonts. When i make the category i can see Greek with no problem at all, when i try to edit the category i see the Greek fonts like that

http://img227.imageshack.us/img227/4029/problem24zp.jpg

The 2nd problem has to do with searching in greek fonts. I did a search for the word "άθλημα" and i found result only i had the same signs as above appearing

http://img227.imageshack.us/img227/1462/problem4xo.jpg

agridoc

Hi BadCluster

It is obvious that you are not using UTF-8 but ISO-8859-1 (English) codepage and English language as default or as user. You must install greek language. If you want greek to work with english menus replace ISO-8859-1 with windows-1253 or ISO-8859-7 in index.english.php found in .../Themes/default/languages

If you want more on this search the Greek language support board http://www.simplemachines.org/community/index.php?board=78.0 or post a new topic there as it is out of this topic' s subject.
  For Greek aeromodellers and our friends around the world  - Greek Button sets for SMF - Greeklish to Greek mod
Δeν αφιερώνω χρόνο για μηνύματα σε greeklish.

NTA

I have this problem too  :(

In RC2, the charactor "à" become "?" , and when i edit this post, i see "à" become "ænbsp;", please fix this soon  :(
I'm using UTF-8 Encoding..

And i found that, if i using quick edit button to edit the post, i see that this bug not happen, everything is ok. maybe this help you found how to fix problem soon.

Best regard
NTA


CalCal

This helped:

In file Subs-Post.php change

// Put it back together!
if (!$previewing)
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />', "\xA0" => '&nbsp;'));
else
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\xA0" => '&nbsp;'));


to

// Put it back together!
if (!$previewing)
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />'));
else
$message = strtr(implode('', $parts), array('  ' => '&nbsp; '));


Anyway, I tested this solution only on localhost because maybe this will mess something else. What are you (developers) think about this?

eyespark

Thank you!!!!! That did it!!!  :P I tried all proposed solutions but only this one worked. Thanks

Quote from: CalCal on February 27, 2006, 11:28:25 AM
This helped:

In file Subs-Post.php change

// Put it back together!
if (!$previewing)
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />', "\xA0" => '&nbsp;'));
else
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\xA0" => '&nbsp;'));


to

// Put it back together!
if (!$previewing)
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />'));
else
$message = strtr(implode('', $parts), array('  ' => '&nbsp; '));


Anyway, I tested this solution only on localhost because maybe this will mess something else. What are you (developers) think about this?


CalCal

It would be very useful if SMF developers can say something about this "hack"... Is it safe to remove the thing I removed:

"\xA0" => '&nbsp;'


???

NTA

Quote from: CalCal on February 27, 2006, 11:28:25 AM
This helped:

In file Subs-Post.php change

// Put it back together!
if (!$previewing)
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />', "\xA0" => '&nbsp;'));
else
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\xA0" => '&nbsp;'));


to

// Put it back together!
if (!$previewing)
$message = strtr(implode('', $parts), array('  ' => '&nbsp; ', "\n" => '<br />'));
else
$message = strtr(implode('', $parts), array('  ' => '&nbsp; '));


Anyway, I tested this solution only on localhost because maybe this will mess something else. What are you (developers) think about this?



Thank!  :D My problem fixed now  :P

spiros

As far as I know, in the latest build, the UTF problems have been fixed. Just wait for the SMF 1.1 final.

quocnht

hxxp:forum.logue.tk/index.php/topic,98.msg631.html#new [nonactive]

Hope this helped !

Advertisement: