Support Forums

special characters in extra fields : help needed

This is a discussion on special characters in extra fields : help needed within the Technical Support forums, part of the Technical Support Forums category; Hi, I'm with v4.0.8 developper version, and using 68classifieds in french language. Some extra fields (stored in 'optValue') are containing ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

This topic is resolved.

If you have a similar issue that this thread does not address, open a new related support topic.

 
Thread Tools Display Modes
Old 08-19-2008, 08:08 AM   #1
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 111
Rep Power: 20
frommarcq is on a distinguished road
Unhappy special characters in extra fields : help needed

Hi,
I'm with v4.0.8 developper version, and using 68classifieds in french language.
Some extra fields (stored in 'optValue') are containing some signs which are causing some troubles (eg. '�', '�'...).
When s/he add or modify an ad, if a member chooses in a list an option containing one of these characters, the 'sValue' created will be empty.
How could I fix this problem ?
Thanks for your help !
Regards
Pascal
__________________
68classifieds (V4.0.9Developer)

maison nord - appartement Lille - maison lens - meteo Lille - restaurants Lievin
frommarcq is offline  
Old 08-19-2008, 02:04 PM   #2
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,471
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Hi Pascal,

Can you give me an example so I can test locally?

Maybe include the extra field type and value entered.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 08-19-2008, 03:05 PM   #3
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 111
Rep Power: 20
frommarcq is on a distinguished road
Default

Hi Eric,
Before you have to change of language file (from UTF-8 tuo iso-8859-1)
Juste create an extra-field "test", and propose 3 choices (checkbox) :
- without accent
- with acc�nt
- with accént
With my configuration, if I only choose the first one, no problem. But if I choose the second and/or the third, the extra field will be displayed, but without any option...
Can you duplicate that ?
Thanks a lot !
Regards
Pascal
__________________
68classifieds (V4.0.9Developer)

maison nord - appartement Lille - maison lens - meteo Lille - restaurants Lievin
frommarcq is offline  
Old 08-19-2008, 03:35 PM   #4
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,471
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Is this in v4.0.8 or the v3.1 line?
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 08-19-2008, 03:37 PM   #5
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 111
Rep Power: 20
frommarcq is on a distinguished road
Default

it is v4.0.8 developper version.
__________________
68classifieds (V4.0.9Developer)

maison nord - appartement Lille - maison lens - meteo Lille - restaurants Lievin
frommarcq is offline  
Old 08-19-2008, 04:30 PM   #6
Senior Member
 
 
Join Date: Apr 2008
Posts: 144
Rep Power: 12
philoo is on a distinguished road
Default

Pascal,

as-tu bascul� les templates de l'Admin en 'charset=ISO-8859-1' ?
Si ce n'est pas le cas, le navigateur ne renvoie correctement pas au serveur les caract�res accentu�s que tu as saisis dans tes champs-extra, et par cons�quent il ne les �crit pas correctement dans la babase ...

=========================

Pascal,

Did you turn your admin templates with the correct 'charset=ISO-8859-1' ?
If not, the navigator will not send correct characters with accents your wrote in your extra-fields to the server that will be unable to write them correctely in database ..
philoo is offline  
Old 08-19-2008, 04:45 PM   #7
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,471
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Hi,

Can you open the includes/classes/kernel/Listings.php and go to line 1811 which should have this:
PHP Code:
'value'=> html_entity_decode($rs['sValue']), 
Try to replace it with:
PHP Code:
'value'=> $rs['sValue'], 
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Old 08-20-2008, 06:54 AM   #8
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 111
Rep Power: 20
frommarcq is on a distinguished road
Default

Sorry, but it didn't work.

I think I've fixed that problem (using your suggestion) changing this code twice in Listings.php :
Code:
$objValue = htmlentities($objValue, ENT_QUOTES, 'UTF-8');
with
Code:
$objValue = htmlspecialchars($objValue, ENT_QUOTES, 'iso-8859-1');
I hope I don't have created a vunerability...

Pascal
__________________
68classifieds (V4.0.9Developer)

maison nord - appartement Lille - maison lens - meteo Lille - restaurants Lievin
frommarcq is offline  
Old 08-20-2008, 07:09 AM   #9
Senior Member
 
frommarcq's Avatar
 
Join Date: Mar 2006
Location: Lille (France)
Posts: 111
Rep Power: 20
frommarcq is on a distinguished road
Default

Philoo,
Thanks for your answer.
The problem was that I upgraded from v3 to v4, because the 'old' fields were causing troubles (before it accepts french characters).
I've changed the charset. I think that if you use a fresh install, you won't have any trouble. But I can't manually change all the fields used before the upgrade.
Regards
Pascal

Philoo,
Merci de ta r�ponse.
Le probl�me vient surtout de la migration de la v3 vers la v4, car les "anciens" champs posaient souci (auparavant, les accents �taient accept�s).
J'ai bien chang� le Charset. Je pense que si tu utilises une installation neuve (sans migration), �a ne doit poser aucun souci. Mais je ne pouvais modifier manuellement la totalit� des anciens champs enregistr�s avant la mise � jour.
Cordialement,
Pascal
__________________
68classifieds (V4.0.9Developer)

maison nord - appartement Lille - maison lens - meteo Lille - restaurants Lievin
frommarcq is offline  
Old 08-20-2008, 09:19 AM   #10
68 Classifieds Staff
 
Eric Barnes's Avatar
 
Join Date: Mar 2006
Location: Belmont, NC
Posts: 5,471
Rep Power: 130
Eric Barnes is just really nice Eric Barnes is just really nice
Default

Good point Pascal. In v4 install we set all the database tables and values to UTF-8. So that could be it.
__________________
Eric Barnes
68 Classifieds Developer
Customer Area | Issue Tracker | Documentation | 68C Mods | 68 @ Twitter | My Modules
Eric Barnes is offline  
Closed Thread

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra fields not searchable even though it is set to searchable fendter Technical Support 5 07-22-2008 02:42 PM


All times are GMT -4. The time now is 09:59 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0