I was talking about the default format for String output, which is dependent upon the operating system character encoding (I guess 95% use ISO-Latin-1). Java internal representation of characters is UNICODE UTF-16 (in fact an obsolete version of this standard) and not UTF-8. (Dealing with variable length characters for internal representation would be a programmer's nightmare!)
Using ISO-Latin-1 for ouptut makes sense because ISO-Latin-1 is the same as UNICODE page 0, thus making the conversion trivial. Pierre-Yves Johan Compagner a écrit : > please attach this to a patch: > http://sourceforge.net/tracker/?group_id=119783&atid=684977 > <http://sourceforge.net/tracker/?group_id=119783&atid=684977> > (and say what files it exactl y are) > > because else it will get lost. > > the standaard in java is not iso-8859-1 internally java is all utf > but saving to disk and reading java looks at the system what the > encoding is. > But if you ask me, what you sent to the browser should always be full utf8 > because then you never have problems who ever you target.. > > The projects i work with it is all utf8 > > browser <-> app server <-> database > > johan > > > On 9/22/06, *Pierre-Yves Saumont* <[EMAIL PROTECTED] <mailto:[EMAIL > PROTECTED]>> > wrote: > > Here are two versions. Using the UTF8 file does not solve the encoding > problem since it will then break applications that use the ISO-8859-1 > encoding setting. The javascript language file should be selected > according to the encoding used, or its content should be translated to > the appropriate encoding. So the solution of using the UTF8 version as > is would be worse than the problem it is supposed to solve. > > Most french applications do in fact use ISO-8859-1 encoding. After all, > isn't this is the default encoding for Java? It is somewhat sad > since it > lacks two characters that are very frequently used in french (oe and OE > ligatures), but I think most french users would not like to be forced to > switch their app to UTF8 to be able to use the datepicker. > > Pierre-Yves > > Johan Compagner a écrit : > > please give as an updated one then can we correct that > > And check it in as UTF-8 somehow > > > > johan > > > > > > On 9/22/06, *Pierre-Yves Saumont* < [EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]> <mailto:[EMAIL PROTECTED] <mailto:[EMAIL > PROTECTED]>>> > > wrote: > > > > The file calendar-fr.js is in DOS format. Is this OK? (By the > way, it > > also contains some spelling errors in messages, but this is > another > > story.) > > > > Pierre-Yves > > > > Johan Compagner a écrit : > > > > > > 1) The following configuration is mandatory if you use > the french > > > language with IE6 : > > > > > > > > > getRequestCycleSettings().setResponseRequestEncoding("ISO-8859-1"); > > > > > > Unless you use this, IE6 reports a Javascript error > because > > the french > > > script with the monthes names reports an unterminated > string > > for every > > > name containing accented characters. This problem does > not occur > > > with FF. > > > > > > > > > hmm this should then be really looked at because this is very > > strange > > > By default we do UTF-8 and that should be able to handle > everything. > > > > > > johan > > > > > > > > > > > > > // ** I18N > > // Calendar EN language > // Author: Mihai Bazon, <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> > // Encoding: any > // Distributed under the same terms as the calendar itself. > > // For translators: please use UTF-8 if possible. We strongly > believe that > // Unicode is the answer to a real internationalized world. Also > please > // include your contact information in the header, as can be seen above. > > // Translator: David Duret, <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> from previous french version > // Edited by Pierre-Yves Saumont <[EMAIL PROTECTED] <mailto:[EMAIL > PROTECTED]>> > > // full day names > Calendar._DN = new Array > ("Dimanche", > "Lundi", > "Mardi", > "Mercredi", > "Jeudi", > "Vendredi", > "Samedi", > "Dimanche"); > > // Please note that the following array of short day names (and the > same goes > // for short month names, _SMN) isn't absolutely necessary. We give > it here > // for exemplification on how one can customize the short day names, > but if > // they are simply the first N letters of the full name you can > simply say: > // > // Calendar._SDN_len = N; // short day name length > // Calendar._SMN_len = N; // short month name length > // > // If N = 3 then this is not needed either since we assume a value > of 3 if not > // present, to be compatible with translation files that were > written before > // this feature. > > // short day names > Calendar._SDN = new Array > ("Dim", > "Lun", > "Mar", > "Mar", > "Jeu", > "Ven", > "Sam", > "Dim"); > > // full month names > Calendar._MN = new Array > ("Janvier", > "Février", > "Mars", > "Avril", > "Mai", > "Juin", > "Juillet", > "Août", > "Septembre", > "Octobre", > "Novembre", > "Décembre"); > > // short month names > Calendar._SMN = new Array > ("Jan", > "Fév", > "Mar", > "Avr", > "Mai", > "Juin", > "Juil", > "Août", > "Sep", > "Oct", > "Nov", > "Déc"); > > // First day of the week. "0" means display Sunday first, "1" means > display > // Monday first, etc. > Calendar._FD = 1; > > // tooltips > Calendar._TT = {}; > Calendar._TT["INFO"] = "A propos du calendrier"; > > Calendar._TT["ABOUT"] = > "DHTML Date/Heure Selecteur\n" + > "(c) dynarch.com <http://dynarch.com> 2002-2005 / Author: Mihai > Bazon\n" + // don't translate this this ;-) > "Pour la dernière version visitez : > http://www.dynarch.com/projects/calendar/\n" + > "Distribué sous license GNU LGPL. Voir > http://gnu.org/licenses/lgpl.html pour les détails." + > "\n\n" + > "Sélection de la date :\n" + > "- Utiliser les boutons \xab, \xbb pour sélectionner l\'année\n" + > "- Utiliser les boutons " + String.fromCharCode(0x2039) + ", " + > String.fromCharCode(0x203a) + " pour sélectionner les mois\n" + > "- Garder la souris sur n'importe quels boutons pour une sélection > plus rapide"; > Calendar._TT["ABOUT_TIME"] = "\n\n" + > "Sélection de l\'heure :\n" + > "- Cliquer sur heures ou minutes pour incrémenter\n" + > "- ou Maj-clic pour décrémenter\n" + > "- ou clic et glisser-déplacer pour une sélection plus rapide"; > > Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)"; > Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)"; > Calendar._TT["GO_TODAY"] = "Atteindre la date du jour"; > Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; > Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)"; > Calendar._TT["SEL_DATE"] = "Sélectionner une date"; > Calendar._TT["DRAG_TO_MOVE"] = "Déplacer"; > Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; > > // the following is to inform that "%s" is to be the first day of week > // %s will be replaced with the day name. > Calendar._TT["DAY_FIRST"] = "Afficher %s en premier"; > > // This may be locale-dependent. It specifies the week-end days, as > an array > // of comma-separated numbers. The numbers are from 0 to 6: 0 means > Sunday, 1 > // means Monday, etc. > Calendar._TT["WEEKEND"] = "0,6"; > > Calendar._TT["CLOSE"] = "Fermer"; > Calendar._TT["TODAY"] = "Aujourd'hui"; > Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la > valeur"; > > // date formats > Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; > Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; > > Calendar._TT["WK"] = "Sem."; > Calendar._TT["TIME"] = "Heure :"; > > > // ** I18N > > // Calendar EN language > // Author: Mihai Bazon, <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> > // Encoding: any > // Distributed under the same terms as the calendar itself. > > // For translators: please use UTF-8 if possible. We strongly > believe that > // Unicode is the answer to a real internationalized world. Also > please > // include your contact information in the header, as can be seen above. > > // Translator: David Duret, <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> from previous french version > // Edited by Pierre-Yves Saumont <[EMAIL PROTECTED] <mailto:[EMAIL > PROTECTED]>> > > // full day names > Calendar._DN = new Array > ("Dimanche", > "Lundi", > "Mardi", > "Mercredi", > "Jeudi", > "Vendredi", > "Samedi", > "Dimanche"); > > // Please note that the following array of short day names (and the > same goes > // for short month names, _SMN) isn't absolutely necessary. We give > it here > // for exemplification on how one can customize the short day names, > but if > // they are simply the first N letters of the full name you can > simply say: > // > // Calendar._SDN_len = N; // short day name length > // Calendar._SMN_len = N; // short month name length > // > // If N = 3 then this is not needed either since we assume a value > of 3 if not > // present, to be compatible with translation files that were > written before > // this feature. > > // short day names > Calendar._SDN = new Array > ("Dim", > "Lun", > "Mar", > "Mar", > "Jeu", > "Ven", > "Sam", > "Dim"); > > // full month names > Calendar._MN = new Array > ("Janvier", > "Février", > "Mars", > "Avril", > "Mai", > "Juin", > "Juillet", > "Août", > "Septembre", > "Octobre", > "Novembre", > "Décembre"); > > // short month names > Calendar._SMN = new Array > ("Jan", > "Fév", > "Mar", > "Avr", > "Mai", > "Juin", > "Juil", > "Août", > "Sep", > "Oct", > "Nov", > "Déc"); > > // First day of the week. "0" means display Sunday first, "1" means > display > // Monday first, etc. > Calendar._FD = 1; > > // tooltips > Calendar._TT = {}; > Calendar._TT["INFO"] = "A propos du calendrier"; > > Calendar._TT["ABOUT"] = > "DHTML Date/Heure Selecteur\n" + > "(c) dynarch.com <http://dynarch.com> 2002-2005 / Author: Mihai > Bazon\n" + // don't translate this this ;-) > "Pour la dernière version visitez : > http://www.dynarch.com/projects/calendar/\n" + > "Distribué sous license GNU LGPL. Voir > http://gnu.org/licenses/lgpl.html pour les détails." + > "\n\n" + > "Sélection de la date :\n" + > "- Utiliser les boutons \xab, \xbb pour sélectionner l\'année\n" + > "- Utiliser les boutons " + String.fromCharCode(0x2039) + ", " + > String.fromCharCode(0x203a) + " pour sélectionner les mois\n" + > "- Garder la souris sur n'importe quels boutons pour une sélection > plus rapide"; > Calendar._TT["ABOUT_TIME"] = "\n\n" + > "Sélection de l\'heure :\n" + > "- Cliquer sur heures ou minutes pour incrémenter\n" + > "- ou Maj-clic pour décrémenter\n" + > "- ou clic et glisser-déplacer pour une sélection plus rapide"; > > Calendar._TT["PREV_YEAR"] = "Année préc. (maintenir pour menu)"; > Calendar._TT["PREV_MONTH"] = "Mois préc. (maintenir pour menu)"; > Calendar._TT["GO_TODAY"] = "Atteindre la date du jour"; > Calendar._TT["NEXT_MONTH"] = "Mois suiv. (maintenir pour menu)"; > Calendar._TT["NEXT_YEAR"] = "Année suiv. (maintenir pour menu)"; > Calendar._TT["SEL_DATE"] = "Sélectionner une date"; > Calendar._TT["DRAG_TO_MOVE"] = "Déplacer"; > Calendar._TT["PART_TODAY"] = " (Aujourd'hui)"; > > // the following is to inform that "%s" is to be the first day of week > // %s will be replaced with the day name. > Calendar._TT["DAY_FIRST"] = "Afficher %s en premier"; > > // This may be locale-dependent. It specifies the week-end days, as > an array > // of comma-separated numbers. The numbers are from 0 to 6: 0 means > Sunday, 1 > // means Monday, etc. > Calendar._TT["WEEKEND"] = "0,6"; > > Calendar._TT["CLOSE"] = "Fermer"; > Calendar._TT["TODAY"] = "Aujourd'hui"; > Calendar._TT["TIME_PART"] = "(Maj-)Clic ou glisser pour modifier la > valeur"; > > // date formats > Calendar._TT["DEF_DATE_FORMAT"] = "%d/%m/%Y"; > Calendar._TT["TT_DATE_FORMAT"] = "%a, %b %e"; > > Calendar._TT["WK"] = "Sem."; > Calendar._TT["TIME"] = "Heure :"; > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to > share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV> > > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > <mailto:Wicket-user@lists.sourceforge.net> > https://lists.sourceforge.net/lists/listinfo/wicket-user > > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user