Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Sign In
Not a member yet? Click here to register.
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:

Quote

ตุลาคม ทำบุญออกพรรษา / ตักบาตรเทโวโรห

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.
Anyone please ?
I try with a BUMP again.
you have to change the CharSet, or get a Thai locale for your site.
win-874
tis-620
Just a stab in the dark but try replacing the stripinput function in maincore.php (lines 313-320) with:

CodeDownload  
// Strip Input Function, prevents HTML in unwanted places
function stripinput($text) {
   if (QUOTES_GPC) $text = stripslashes($text);
   $search = array("\"", "'", "\\", '\"', "\'", "<", ">", "&nbsp;");
   $replace = array("&quot;", "&#39;", "&#92;", "&quot;", "&#39;", "&lt;", "&gt;", " ");
   $text = str_replace($search, $replace, $text);
   return $text;
}

Quote

Digitanium wrote:
Just a stab in the dark but try replacing the stripinput function in maincore.php (lines 313-320) with:

CodeDownload  
// Strip Input Function, prevents HTML in unwanted places
function stripinput($text) {
   if (QUOTES_GPC) $text = stripslashes($text);
   $search = array("\"", "'", "\\", '\"', "\'", "<", ">", "&nbsp;");
   $replace = array("&quot;", "&#39;", "&#92;", "&quot;", "&#39;", "&lt;", "&gt;", " ");
   $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 :-)
for me it didnt helped

http://testswc3.wc3.lv

Quote

archeens wrote:
for me it didnt helped

http://testswc3.wc3.lv

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.
it working for me in v7.01.04

but when i upgrade to v7.01.05 and i put same code

CodeDownload  
// Strip Input Function, prevents HTML in unwanted places
function stripinput($text) {
   if (QUOTES_GPC) $text = stripslashes($text);
   $search = array("\"", "'", "\\", '\"', "\'", "<", ">", "&nbsp;");
   $replace = array("&quot;", "'", "\", "&quot;", "'", "&lt;", "&gt;", " ");
   $text = str_replace($search, $replace, $text);
   return $text;
}

[/quote]

not working..

anyone can help?
this thread dont have anymore support?....
Emilife93, please be patient a experienced user will help you at some point.

Please also remember the Rules regarding Double Posting.

Quote

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
@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 !
but when i use http://validator.w3.org 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
Did you convert database to utf-8 before you changed global.php? Without this operation, Ankur's idea can't work.

Quote

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 ?

Quote

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 !
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
hi , my site is persian .

please test :

$config['charset'] = "utf-8";

if not work test on this:

$locale['charset'] = "utf-8";
Thread Information
Author
Replies
20 posts
Views
12,539 times
Last Post
Last updated on 9 years ago
You can view all discussion threads in this forum.
You cannot set up a bounty in this discussion thread.
You can start a new discussion thread in this forum.
You cannot reply in this discussion thread.
You cannot start on a poll in this forum.
You cannot upload attachments in this forum.
You can download attachments in this forum.
You cannot up or down-vote on the post in this discussion thread.
Users who participated in discussion: Falk, KFJ, Craig, jantom, hame, archeens, behrooz, emilife93, Ankur