News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

problem with uft-8 ?

Started by tumickey, November 25, 2005, 09:19:19 PM

Previous topic - Next topic

tumickey

I have posted recently a topic about a problem in the display of topic .
I from Vietnam.

And this problem

http://www.nhipsongcantho.com/forum/index.php?topic=174.0 [nofollow]

i find thist problem is parse_bbc() in subs.php

please help me

Sheepy

What's the problem and what charset you're using?

tumickey

it's Vietnamese.

QuoteTừ nhiều năm qua, ở Nhænbsp; VHTN quận Ninh Kiều, phần mặt tiền đường Lý Tự Trọng lænbsp; gian phòng dænbsp;nh cho cửa hiệu may quần áo (không rõ đây lænbsp; chủ trương dạy may quần áo cho các cháu thiếu nhi hay cho tư nhân thuê ?) còn cả tầng 2 của tòa nhænbsp; thì dænbsp;nh cho các lớp dạy thể dục thẫm mỹ, thể dục nhịp điệu, massage, chăm sóc lænbsp;m đẹp vænbsp;

so good is

QuoteTừ nhiều năm qua, ở Nhà VHTN quận Ninh Kiều, phần mặt tiền đường Lý Tự Trọng là gian phòng dành cho cửa hiệu may quần áo (không rõ đây là chủ trương dạy may quần áo cho các cháu thiếu nhi hay cho tư nhân thuê ?) còn cả tầng 2 của tòa nhà thì dành cho các lớp dạy thể dục thẫm mỹ, thể dục nhịp điệu, massage, chăm sóc làm đẹp và tất nhiên đối tượng được phục vụ không phải là thiếu nhi.

if I don't use parse_bbc() then so real.

sorry i talk englst not good . :)

Sheepy

A text sample is good.

There are at least four Vietnamese charset on Internet - TCVN, VIUSCII, VPS, and Windows-1258.

Some charset has to be handled differently from English, otherwise result in display error.

Don't know Vietnamese, but will try to see if can help.  Your English is not bad, good enough for support request. ^_^

tumickey

oh thanks  (^__^)

Nhà -> Nhænbsp
là  -> lænbsp

=> à -> ænbsp

this problem ??


Sheepy

I see.  Yes I understand now.  It is fixed in 1.1 RC 2.

You can try to censor all "ænbsp;" to be "à".  It worked for me.

Sheepy

Oh and, forget about the charset stuff.  You already stated it is utf-8.  My flu is causing me to not think clearly. @_@

If the censor doesn't work, reply and I'll try to reproduce & fix it.  Given that I mod for Chinese community, I use UTF-8 a lot.  Just finish a UTF-8 parser for a mod last week, actually...

tumickey

o thanks very much .
i try fix in Display.php

// Run BBC interpreter on the message.
   $message['body'] = parse_bbc($message['body'], $message['smileysEnabled'], $message['ID_MSG']);
   
$message['body'] = strtr($message['body'], array('<br />'=>'<br>','&nbsp;' => 'à'));

result is

Quote
༢r>Từ nhiều năm qua, ở Nhà VHTN quận Ninh Kiều, phần mặt tiền đường Lý Tự Trọng là gian phòng dành cho cửa hiệu may quần áo (không rõ đây là chủ trương dạy may quần áo cho các cháu thiếu nhi hay cho tư nhân thuê ?) còn cả tầng 2 của tòa nhà thì dành cho các lớp dạy thể dục thẫm mỹ, thể dục nhịp điệu, massage, chăm sóc làm đẹp và tất nhiên đối tượng được phục vụ không phải là thiếu nhi.

but

Quote

༩mg src="http://www.baocantho.com.vn/news/images/news/655/32.jpg [nofollow]" alt="" border="0" />
Nhiều thiết bị phục vụ trò chơi miễn phí (ở Nhà VHTN quận Ninh Kiều) đã xuống cấp mà không được tu sửa.
༢r>


problem is &nbsp;

you have good code ?


Sheepy

Try censor text instead, configured frmo admin panel.  And you may want to use "ænbsp;" => "à"  and  *after that* "&nbsp;" => " "

tumickey

#9
it's not word
but i try fix some code and it word :)

remove this code in Subs.php

// Cleanup whitespace.
$message = strtr($message, array('  ' => ' &nbsp;', "\r" => '', "\n" => '<br />', '<br /> ' => '<br />&nbsp;'));


next add this code in display.php

$message['body'] = strtr($message['body'], array('<br />'=>'<br>','&nbsp;' => 'à'));

after
// Run BBC interpreter on the message.
$message['body'] = parse_bbc($message['body'], $message['smileysEnabled'], $message['ID_MSG']);


:)

I should like to thank you very much for your help.

tumickey

hic
it's not word good some where.
But i think have problem in template .
when I view source it's show real.
?

Sheepy

when you view source it's show view??  ??? You mean it works in browser but not in source?

Advertisement: