Marcher Technologies Posted December 30, 2012 Posted December 30, 2012 http://community.invisionpower.com/resources/bugs.html/_/ip-board/bug-in-the-stop-shouting-setting-r40611 While in the end this is working as intended, it can work better. give a few more formatting options and honor them and everybody is happy.
Vince G. Posted December 31, 2012 Posted December 31, 2012 Although that can be a nice feature for some boards, That's not going to fix the original bug reported. ucwords does not work well with languages such as Russian, Turkish, Hebrew etc.. Consider the following: <?php header('Content-Type: text/html; charset=UTF-8'); $word = "THIS is A TestinG SENTENCE"; echo ucwords($word); echo "nn<br /><br />"; $word = "Ючю эю пожжэ компльыктётюр. Граэки дэфянятйоныс шэа ед"; echo ucwords($word); echo "nn<br /><br />"; $word = "Ючю эю пожжэ компльыктётюр. Граэки дэфянятйоныс шэа ед"; echo mb_convert_case($word, MB_CASE_TITLE, "UTF-8"); Which will output: THIS Is A TestinG SENTENCE Ючю эю пожжэ компльыктётюр. Граэки дэфянятйоныс шэа ед Ючю Эю Пожжэ Компльыктётюр. Граэки Дэфянятйоныс Шэа Ед Notice the difference in the 2nd and 3rd lines (last 3 words first letter).
Marcher Technologies Posted December 31, 2012 Author Posted December 31, 2012 Still not a bug, as that is properly handled in testing. Topic title: Ючю эю пожжэ компльыктётюр. Граэки дэфянятйоныс шэа ед Stop shouting in titles is on. " alt="2012-12-30_1719.png"> Does not invalidate my suggestion, but that is properly handled.
Vince G. Posted December 31, 2012 Posted December 31, 2012 That's right. I haven't even tested this in the forums but i see that they are actually using the mb_* functions if( $this->settings['etfilter_shout'] ) { if( function_exists('mb_convert_case') ) { if( in_array( strtolower( $this->settings['gb_char_set'] ), array_map( 'strtolower', mb_list_encodings() ) ) ) { $this->_topicTitle = mb_convert_case( $this->_topicTitle, MB_CASE_TITLE, $this->settings['gb_char_set'] ); } else { $this->_topicTitle = ucwords( strtolower($this->_topicTitle) ); } } else { $this->_topicTitle = ucwords( strtolower($this->_topicTitle) ); } } So the reported bug is not actually a bug.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.