Opened 10 years ago
Closed 10 years ago
#8648 closed bug (wontfix)
jquery-ui datepicker displays wrong characters when document charset is ISO8859-1
Reported by: | pk | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 1.9.1 |
Component: | ui.datepicker | Version: | 1.9.0 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
$.datepicker.regionalfr? assumes that DOCTYPE CHARSET is UTF8 ....
I use "legacy" database entries that are ISO8859-1 and wrong characters are displayed...
I believe that jquery-ui localised settings should not be charset dependant.
I have modified the settings replacing accent characters with there html entities and it works fine...
(i.e "é" is replaced by "é" )
could you integrate the changes for the next release?
/* Pascal KISSIAN : htmlentities for accents */ /* French initialisation for the jQuery UI date picker plugin. */ /* Written by Keith Wood (kbwood{at}iinet.com.au),
Stéphane Nahmani ([email protected]…), Stéphane Raimbault <[email protected]…> */
jQuery(function($){
$.datepicker.regionalfr? = {
closeText: 'Fermer', prevText: 'Précédent', nextText: 'Suivant', currentText: 'Aujourd\'hui',
monthNames: ['Janvier','Février','Mars','Avril','Mai','Juin',
'Juillet','Août','Septembre','Octobre','Novembre','Décembre'],
monthNamesShort: ['Janv.','Févr.','Mars','Avril','Mai','Juin',
'Juil.','Août','Sept.','Oct.','Nov.','Déc.'],
dayNames: ['Dimanche','Lundi','Mardi','Mercredi','Jeudi','Vendredi','Samedi'], dayNamesShort: ['Dim.','Lun.','Mar.','Mer.','Jeu.','Ven.','Sam.'], dayNamesMin: ['D','L','M','M','J','V','S'], weekHeader: 'Sem.', dateFormat: 'dd/mm/yy', firstDay: 1, isRTL: false, showMonthAfterYear: false, yearSuffix: };
$.datepicker.setDefaults($.datepicker.regionalfr?);
});
BTW, all regional settings of all widgets should be html coded...
Change History (1)
comment:1 Changed 10 years ago by
Component: | ui.core → ui.datepicker |
---|---|
Resolution: | → wontfix |
Status: | new → closed |
It's much more sane to use UTF-8. We intentionally removed all HTML encoding. If you want your page to render with ISO8859-1, you can probably just set the encoding on the JS files.