Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
lokasher
New Member
New Member



Joined: Mar 27, 2006
Posts: 17

PostPosted: Sun Jan 29, 2012 9:37 am Reply with quote

First of all CONGRATULATION and thanks to all the ravennuke team for the new release.
Im having a problem with unicode characters like persian or arabic language,
before with rn2.4 it was working fine now all im getting is ????????.
I have checked the website and database charset its UTF-8.
Tell me what should i do.
thanks
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sun Jan 29, 2012 10:26 am Reply with quote

Have you looked at the sites source code and seen what charset the meta tag is defining? I don't know if this will help or not, but it is defined in the language file located in the sites language folder and looks like this:

Code:


define('_CHARSET','ISO-8859-1');


You may need to change that to UTF-8. You might have to open and save the language files as UTF-8 also. These are just ideas, I have no idea if it will work or not so only try it on a test site and backup your site in case it boogers it up.

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Sun Jan 29, 2012 10:36 am Reply with quote

lokasher, are you haveing this problem with language files or when you enter content? Does it happen to new and old content?

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
lokasher







PostPosted: Sun Jan 29, 2012 10:40 am Reply with quote

meta tag is utf-8 i changed it.
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
no not the language file just the content.
Actually im using a random quote block,rest of the site is in english language.
 
Palbin







PostPosted: Sun Jan 29, 2012 10:57 am Reply with quote

Where does the block get its quotes? Are they hard coded, from database, etc?
 
lokasher







PostPosted: Sun Jan 29, 2012 11:12 am Reply with quote

from database.
 
Palbin







PostPosted: Sun Jan 29, 2012 11:41 am Reply with quote

In db/mysqli.php try un-commenting line 122:
Code:


//$this->set_charset();

Code:


$this->set_charset();
 
lokasher







PostPosted: Mon Jan 30, 2012 8:36 am Reply with quote

not working im getting this error
Fatal error: Maximum function nesting level of '100' reached, aborting! in C:\wamp\www\*****\db\mysqli.php on line 407
 
lokasher







PostPosted: Wed Feb 01, 2012 6:21 am Reply with quote

how and where can i add this to mysqli.php
Code:


('SET character_set_results="utf8"');
 
lokasher







PostPosted: Wed Feb 01, 2012 8:07 am Reply with quote

added these lines after line 212 and that solved my problem.

Code:


      //return ($transaction == END_TRANSACTION) ? true : false;
      $this->sql_query('SET character_set_results = utf8');
      $this->sql_query('SET character_set_connection = utf8');
      $this->sql_query('SET character_set_client = utf8');
      $this->sql_query('SET character_set_results = utf8');
      $this->sql_query('SET NAMES utf8');
      mb_internal_encoding('utf8');
      
      return $this->query_result;
 
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1774

PostPosted: Mon Jun 04, 2012 5:36 am Reply with quote

same problem here, but i can't save the correct characters in my database. the database is on utf8_general_ci and the lang-constant is:
Code:
define('_CHARSET','UTF-8');


now i want save a string into the database. i use the german special chars, like "öäü" and in the database was stored this:
Code:
öäü


i have try it make the changes from lokasher, but it will not work.
what is now correct?
Code:
$xsmall = $db->sql_escape_string(check_html($xsmall, ''));

or:
Code:
$xsmall = $db->sql_escape_string(check_html($xsmall, 'nohtml'));

or:
Code:
$xsmall = $db->sql_escape_string($xsmall);


Palbin wrote:
In db/mysqli.php try un-commenting line 122:
Code:


//$this->set_charset();

Code:


$this->set_charset();


this one crashed my local apache2...
 
View user's profile Send private message
neralex







PostPosted: Mon Jun 04, 2012 3:34 pm Reply with quote

Has anybody tried to build a complete page in UTF-8? It's really annoying that this does not work.
 
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Mon Jun 04, 2012 5:12 pm Reply with quote

I have not tried it with RN2.5 but official UTF8 support will be coming in a future RN release. Not to say it's not possible, but I'm pretty sure there would be many changes required.. but Palbin would have to answer that Smile

Not really my area of expertise but what happens when the data is output? It does look somewhat like utf8 encoded data.
 
View user's profile Send private message Visit poster's website
Palbin







PostPosted: Mon Jun 04, 2012 6:00 pm Reply with quote

Try these two files:
db.php - [ Only registered users can see links on this board! Get registered or login! ]
mysqli.php - [ Only registered users can see links on this board! Get registered or login! ]
 
neralex







PostPosted: Mon Jun 04, 2012 6:36 pm Reply with quote

it works Smile YEAH thanks, Palbin!

RavensScripts
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1123

PostPosted: Tue Jun 05, 2012 2:43 am Reply with quote

Question to Palbi.

What is the different with these two lines?

Code:
$db = new sql_db($dbhost, $dbuname, $dbpass, $dbname, false);


new code

Code:
$db = sql_db::getInstance($dbhost, $dbuname, $dbpass, $dbname, false);


Question Question Shocked
 
View user's profile Send private message
Palbin







PostPosted: Wed Jun 06, 2012 11:56 pm Reply with quote

The first line is just making a new instance of the "sql_db" class. Since we are tying to use the "singleton" approach in terms of the db class the second line uses the getInstance function defined within the class. This function returns the instance of the class if was already initiated. If it is not initiated it will run the first line from within the function. That is best I can explain the concept.
 
neralex







PostPosted: Fri Jun 15, 2012 2:39 pm Reply with quote

Hey Palbin,

i have a prob with your files and the backend.php. I can't see the entries but as html version in the module Feeds is all ok. I have the changed back to old files and i can see the entries. Do you have an idea, where i can find the solution? Is it inside the module?

Code:
 <?xml version="1.0" encoding="utf-8"?>

-^


CHARSET and database are on UTF-8...

Edit: Next one to this issue. I can see in the sourcode the entries but the filtering don't work with title and specialchars (äüö). I think here is an bug inside the FeedCreator, too. I have tried utf8_decode and it seems it works in the sourcecode view.

file: includes/feedcreater/feedcreator.class.php

Code:
$feed.= "            <title>".FeedCreator::iTrunc(utf8_decode(strip_tags($this->items[$i]->title)),100)."</title>\n";
 
neralex







PostPosted: Mon Jun 18, 2012 1:20 pm Reply with quote

Palbin wrote:
Try these two files:
db.php - [ Only registered users can see links on this board! Get registered or login! ]
mysqli.php - [ Only registered users can see links on this board! Get registered or login! ]


neralex wrote:
i have a prob with your files and the backend.php. I can't see the entries but as html version in the module Feeds is all ok. I have the changed back to old files and i can see the entries. Do you have an idea, where i can find the solution? Is it inside the module?

Code:
 <?xml version="1.0" encoding="utf-8"?>

-^


CHARSET and database are on UTF-8...


I found a solution for my problem Smile

I have stored one of this file in ISO mode directly in windows. I always got a freespace at the beginning of the xml feed. After a lot of testing, i have tried to save the files again, but now with my php editor in utf-8 and it works. What should i say to my windows: f*** s*** Smile


Last edited by neralex on Wed Aug 12, 2015 10:26 pm; edited 1 time in total 
rovshan
Hangin' Around



Joined: Nov 26, 2005
Posts: 40

PostPosted: Mon Feb 16, 2015 4:56 pm Reply with quote

[quote="neralex"]
Palbin wrote:
Try these two files:
db.php - [ Only registered users can see links on this board! Get registered or login! ]
mysqli.php - [ Only registered users can see links on this board! Get registered or login! ]


these links are broken.. any help will be greatly appreciated...
 
View user's profile Send private message
neralex







PostPosted: Mon Feb 16, 2015 10:32 pm Reply with quote

rovshan, sent via PM. You should only use it with a fresh installed database with utf8_general_ci. You have to change the php filterings in many modules because RN25x isn't support utf-8. So do not use it in a running page otherwise you would get many issues with your stored entries e.g. forums etc.

Note: this is not a official supported solution but it has helped me to switch my modded RN25x to utf-8.
 
kenspa
Hangin' Around



Joined: Sep 24, 2005
Posts: 48
Location: Spain

PostPosted: Sat May 30, 2015 2:58 pm Reply with quote

I'm having a kind of same problem with the special characters in Spanish like vowels with accent and ñ
When previewing the post before sending it, and if any of those special characters are in the message, nothing will appear in the preview and the whole message is removed!!
Those links from palbin are broken, so I wasn't able to have a look!!
There must be something to fix in Forums/posting.php in order to enable the special characters. I've installed the ABBC_Box v 2.5 immediately after installing the whole site, so I'm not aware if this might be the cause.

BTW I tried to write some spanish special characters in this message and preview it, but it Works perfect here!!

Any help will be appreciated. Thanks
 
View user's profile Send private message
neralex







PostPosted: Sun May 31, 2015 11:00 am Reply with quote

RN25x doesn't support utf-8. So the best way to use special chars is to leave the charset as it is on ISO and LATIN db colation. As i wrote, if you want use utf-8 on RN25x then you have to recode many many things. It isn't done to use only the both files from Palbin.
 
kenspa







PostPosted: Sat Jul 04, 2015 11:29 am Reply with quote

neralex, can you please provide a link to db.php and mysqli.php??
Many thanks
 
neralex







PostPosted: Sun Jul 05, 2015 5:43 am Reply with quote

That wouldn't help to solve your issue!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©