|
UTF-8
|
| KFJ |
Posted on 13-10-2008 19:46
|

Junior Member

Posts: 48
Joined: 21/06/2004
|
Hi there,
Wasn't sure where I should post this, so it's posted here.
In ver. 6 it was possible at my site to write posts in the forum in both english, danish and thai, but after the update to ver. 7 it's only possible to write english and danish. When trying to post something which contain thai it change to something unreadable as following:
ตุลาคม ทำบุญออกพรรษา / ตักบาตรเทโวโรห
Is there any way to add thai too in ver. 7, so it again will be possible for my users to mix between the languages ?
I'm not sure if the problem is in the database where I using UTF-8 Unicode or in the way PHP-Fusion handle thai when posting something.
Hope someone can help me.
Thanks :-)
BTW: I just try here at this site too. It's not possible to use thai here too. |
| |
|
|
| KFJ |
Posted on 15-10-2008 04:59
|

Junior Member

Posts: 48
Joined: 21/06/2004
|
Anyone please ? |
| |
|
|
| KFJ |
Posted on 16-01-2009 18:11
|

Junior Member

Posts: 48
Joined: 21/06/2004
|
I try with a BUMP again. |
| |
|
|
| hame |
Posted on 16-01-2009 18:46
|

Senior Member

Posts: 424
Joined: 24/03/2008
|
you have to change the CharSet, or get a Thai locale for your site.
win-874
tis-620
|
| |
|
|
| Digitanium |
Posted on 16-01-2009 21:14
|

Super Admin

Posts: 1280
Joined: 12/04/2003
|
Just a stab in the dark but try replacing the stripinput function in maincore.php (lines 313-320) with:
Code// Strip Input Function, prevents HTML in unwanted places
function stripinput($text) {
if (QUOTES_GPC) $text = stripslashes($text);
$search = array("\"", "'", "\\", '\"', "\'", "<", ">", " ");
$replace = array(""", "'", "\", """, "'", "<", ">", " ");
$text = str_replace($search, $replace, $text);
return $text;
}
|
| |
|
|
| KFJ |
Posted on 18-01-2009 18:00
|

Junior Member

Posts: 48
Joined: 21/06/2004
|
Digitanium wrote:
Just a stab in the dark but try replacing the stripinput function in maincore.php (lines 313-320) with:
Code// Strip Input Function, prevents HTML in unwanted places
function stripinput($text) {
if (QUOTES_GPC) $text = stripslashes($text);
$search = array("\"", "'", "\\", '\"', "\'", "<", ">", " ");
$replace = array(""", "'", "\", """, "'", "<", ">", " ");
$text = str_replace($search, $replace, $text);
return $text;
}
Thanks Digi :-)
It seems like this solution helps. Now, it's both possible to write english, thai and danish with the speciel letters (æøåÆØÅ) again.
Thanks for your help :-) |
| |
|
|
| archeens |
Posted on 18-01-2009 18:06
|

Junior Member

Posts: 28
Joined: 21/11/2008
|
for me it didnt helped
http://testswc3.w... |
| |
|
|
| KFJ |
Posted on 18-01-2009 18:09
|

Junior Member

Posts: 48
Joined: 21/06/2004
|
Sad to hear, but maybe we not had the same problem. At my site it was possible to read the old post written in thai in v6, just not possible to write new posts in thai with v7 before this solution from Digi. |
| |
|
|
| emilife93 |
Posted on 24-02-2011 16:39
|

Member

Posts: 176
Joined: 06/08/2010
|
it working for me in v7.01.04
but when i upgrade to v7.01.05 and i put same code
Code// Strip Input Function, prevents HTML in unwanted places
function stripinput($text) {
if (QUOTES_GPC) $text = stripslashes($text);
$search = array("\"", "'", "\\", '\"', "\'", "<", ">", " ");
$replace = array(""", "'", "\", """, "'", "<", ">", " ");
$text = str_replace($search, $replace, $text);
return $text;
}
[/quote]
not working..
anyone can help?
Edited by emilife93 on 24-02-2011 17:03
|
| |
|
|
| emilife93 |
Posted on 24-02-2011 19:09
|

Member

Posts: 176
Joined: 06/08/2010
|
this thread dont have anymore support?.... |
| |
|
|
| Craig |
Posted on 24-02-2011 19:24
|

Fusioneer

Posts: 3980
Joined: 27/09/2005
|
Emilife93, please be patient a experienced user will help you at some point.
Please also remember the Rules regarding Double Posting.
|
| |
|
|
| emilife93 |
Posted on 24-02-2011 19:28
|

Member

Posts: 176
Joined: 06/08/2010
|
Fangree_Craig wrote:
Emilife93, please be patient a experienced user will help you at some point.
Please also remember the Rules regarding Double Posting.
ok....sory for mistake |
| |
|
|
| Ankur |
Posted on 25-02-2011 13:27
|

Admin

Posts: 1291
Joined: 02/11/2010
|
@EmiLife : Try changing these values in locale/Your_Locale/global.php :
$locale['charset'];
$locale['xml_lang'];
$locale['tinymce'];
$locale['phpmailer'];
Set the Charset to UTF-8 and the xml lang to your Language Code !
|
| |
|
|
| emilife93 |
Posted on 25-02-2011 14:45
|

Member

Posts: 176
Joined: 06/08/2010
|
but when i use http://validator.... to validate check i get this error after change the Character Encoding
1. Error
Sorry, I am unable to validate this document because on line 370 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.
The error was: utf8 "\x93" does not map to Unicode
Edited by emilife93 on 25-02-2011 14:51
|
| |
|
|
| jantom |
Posted on 25-02-2011 21:17
|

Junior Member

Posts: 48
Joined: 28/08/2006
|
Did you convert database to utf-8 before you changed global.php? Without this operation, Ankur's idea can't work.
...because the Prophet is only one...
|
| |
|
|
| emilife93 |
Posted on 25-02-2011 22:54
|

Member

Posts: 176
Joined: 06/08/2010
|
jantom wrote:
Did you convert database to utf-8 before you changed global.php? Without this operation, Ankur's idea can't work.
how to convect that ? |
| |
|
|
| Ankur |
Posted on 26-02-2011 11:23
|

Admin

Posts: 1291
Joined: 02/11/2010
|
jantom wrote:
Did you convert database to utf-8 before you changed global.php? Without this operation, Ankur's idea can't work.
But I am using Hindi Language with UTF-8 just by this method without changing the Database Character set, i.e Collation ! And My website is Validated except those HTML errors like on using onmouseout and onmousehover functions !
|
| |
|
|
| emilife93 |
Posted on 26-02-2011 13:32
|

Member

Posts: 176
Joined: 06/08/2010
|
Ankur i Set the Charset to UTF-8 and the xml lang to Arabic Language Code ! and it working
but when i want to validator i get this error
Sorry, I am unable to validate this document because on line 480 it contained one or more bytes that I cannot interpret as utf-8 (in other words, the bytes found are not valid values in the specified Character Encoding). Please check both the content of the file and the character encoding indication.
The error was: utf8 "\x93" does not map to Unicode |
| |
|
|
| Ankur |
Posted on 26-02-2011 13:56
|

Admin

Posts: 1291
Joined: 02/11/2010
|
For better response, you should Post on Arabic Site : http://www.phpfus...m/news.php
|
| |
|
|
| behrooz |
Posted on 26-02-2011 16:42
|

Member

Posts: 110
Joined: 25/08/2009
|
hi , my site is persian .
please test :
$config['charset'] = "utf-8";
if not work test on this:
$locale['charset'] = "utf-8";
|
| |
|