Chamilo LMS - Feature #272 UTF-8 Native Support 03/12/2009 00:06 - Carlos Vargas

Total Page:16

File Type:pdf, Size:1020Kb

Chamilo LMS - Feature #272 UTF-8 Native Support 03/12/2009 00:06 - Carlos Vargas Chamilo LMS - Feature #272 UTF-8 native support 03/12/2009 00:06 - Carlos Vargas Status: Feature implemented Start date: 03/12/2009 Priority: Normal Due date: Assignee: Ivan Tcholakov % Done: 100% Category: Estimated time: 0.00 hour Target version: 1.8.7 beta Spent time: 0.00 hour Complexity: Normal SCRUM pts - 100 complexity: Description An e-mail from cristi hypermedia.eu --- Hello, We’re sorry for the delay, but we’ve been pretty busy here at Hypermedia :) I could send you the whole version that I’ve modified from Dokeos 1.6.3 , but there are many modifications – customizations in fact that were needed at that moment. (if you want the whole version I modified, just say so and it will be no problem for me to send it. I just think that it will be way to complicated to follow all the modifications, because I cannot remember all the things I’ve changed :D). I mean no offense if there are too many explanations, but I wrote the document this way, so that maybe we can use it to show a “non-technical” person how to migrate. Here is the roadmap I followed (actually I wrote it afterwards) for UTF8 conversion of Dokeos: I’ve used here the MySql command line because it’s faster. If you want to use phpmyadmin, I think you should be careful what ‘MySQL charset’ and what ‘MySQL connection collation’ are you using. I will try this sometime, but for the smoothest results my guess is that: - before making the dump you have to use MySQL charset latin1 and MySQL connection collation latin1_swedish (the default for the Mysql tables) - before loading the dump (converted to UTF8) you have to change MySQL charset to utf8 and MySQL connection collation utf8_general_ci It might work in any case, but I think this is the easiest way. 1. Database: Currently the whole Dokeos database uses latin1_swedish charset in MySql. There are a few ways of converting the whole database. Many say to convert all your ‘text’ fields (varchar included) to binary and then run queries. But I have this way of doing it, which is much more “nice” and VERY MUCH FASTER. - Create dump with latin1 charset: mysqldump --default-character-set=latin1 u root -p dokeos_main > dokeos_latin1.sql Remove (or replace) all the charset-related directives. For example – you could replace ‘DEFAULT CHARSET=latin1’ with ‘DEFAULT CHARSET=utf8’ in all the document. Or, if you create your new database with default collation utf_general_ci , you could just remove all the ‘DEFAULT CHARSET=latin1’ from the file, and then when you import it, MySql will use the database default charset for all the tables. - Convert the dump file from latin1 (iso-8859-1) to utf-8 You could use several ways of doing this, but the nicest I have so far is by using the iconv library (on Linux is installed by default I guess, for Windows I downloaded it from http://gnuwin32.sourceforge.net/packages/libiconv.htm) iconv f iso-8859-7 -t utf-8 dokeos_latin1.sql > dokeos_utf8.sql Create a new database with collation utf8_general_ci – database dokeos_utf8.sql - import the new file with utf-8 charset in the new database mysql --default-character-set=utf8 u root -p dokeos_utf < dokeos_utf8.sql Check with phpmyadmin using utf connection and collation to see if texts from all languages are ok (greek is just an example because it uses non latin characters and that’s what we’ve been using here in Cyprus). 02/10/2021 1/47 2. Language files convert from iso-8859-1 to utf-8: I used again the iconv library. For the greek files I used : iconv.exe -f iso-8859-7 -t utf-8 language_file.inc.php > utf/language_file.inc.php all the language files in claroline/lang - problems in chat.inc.php - remove special characters or convert to html entities (I have to clear what was this about sometime) – it seems there are some greek special characters that are not “fully” supported for conversion. Additional language conversions: - ctools/wiki/greek.inc.php - claroline/ctools/glossary/lang/greek/glossarie.inc.php - egnosis/home/home_*_greek.html - files with texts from home page - ctools/poll/calendar/popcalendar.js - greek months names I did these conversion because we used those plugins and tolls in the platform. 3. Modify code-files in claroline directory: Notice that line numbers might not be the same – I told you I made many modifications on the platform. There is a catch here. Search for all mysql_connect() calls and add SET NAMES and SET CHARACTER SET - inc\\claro_init_global_inc.php - added lines 64,65 (after mysql_select_db()) mysql_query("SET NAMES 'utf8'", $dokeos_database_connection); mysql_query("SET CHARACTER SET 'utf8'", $dokeos_database_connection); - ctools\\glossary\\glossary.php line 291 - added function utf8_substr() and used it everywhere in the document instead of substr() - plugin/CoolSearch/ - implemented separate language files for English and Greek using UTF8 - announcements/announcements.php - line 619: UTF-8 encoding for email (instead of iso-8859-1) - admin/user_import.php - UTF-8 charset for the imported file (?!) - admin/user_export.php - UTF-8 charset for the exported file - auth/inscription_second.php - utf-8 charset for the email sent to the new user - calendar/calendar.php - charset of the calendar page - inc/claro_init_header.inc.php - set default charset to UTF-8 - inc/phpmailer/class.phpmailer.php - line 36: set utf-8 encoding for mails - inc/phpmailer/phpdoc/phpmailer.html - description of phpmailer class - line 526: default encoding of mails is utf-8 - inc/phpmailer/test/phpmailer_test.php - lines 63,198: set mail's encoding to utf-8 - lang/english/trad4all.inc.php - line 18: $charset='utf-8'; - lang/(english|greek)/tracking.inc.php - add $status_lang - array with possible status of a lesson - learnpath/learnpath_functions.inc.php - line 2301: set charset of the manifest file to utf-8 - online/header_frame.inc.php - line 67: set page encoding to utf-8 - online/online.php - line 46: set page encoding to utf-8 - scorm/closesco.php - line 49: set page encoding to utf-8 - scorm/contents.php - line 68: set page encoding to utf-8 - scorm/opensco.php - line 51: set page encoding to utf-8 - tracking/courseLog.php - line 60: set page encoding to utf-8 - line 108: if $status_lang not imported from language file, put it in english language - tracking/userLog.php - lines 81,85: set default translations encoding to utf-8 02/10/2021 2/47 - line 67: if $status_lang not imported from language file, put it in english language - work/student.html - line 4: set page encoding to utf-8 Also, there are some characters that are not displayed correctly in utf8 - CHANGE special characters that are displayed garbled in UTF8 to HTML entities: - « and » instead of « and » - calendar/agenda.inc.php - calendar/myagenda.php - CHANGE CREATE DATABASE syntax - DEFAULT CHARACTER SET utf8 for all tables created from within php scripts: - claroline/calendar/myagenda.php - line 113 - claroline/inc/lib/add_course.lib.inc.php - line 199 - claroline/install/install_db.inc.php - line 127, 143, 161, 179 - leave CREATE TABLE syntax as it is for now - CHANGE CREATE TABLE syntax DEFAULT CHARSET = utf8: - claroline/inc/lib/add_course.lib.inc.php ctools/poll/calendar/popcalendar.js - months names - phpbb/reply.php - line 526: replaced htmlentities() function with htmlspecialchars() Here it is now a list of the PROBLEMATIC PHP functions when working with UTF8 strings: - String functions - they all have equivalents in mbstring extension (prefixed with 'mb_') : - strcut() - strlen() - strpos() - strrpos() - strtolower() - strtoupper() - substr_count() - substr() I used built-up utf8_substr() function for now The best solution to fix these problem is to test if the mbstring extension for php is installed and work with equivalent string functions if yes. If it is not installed, we could use the iconv() functions from PHP to convert strings on the fly, but of course this will slow down things. However there might be many cases when you cannot use mbstring evan if you want to (hosting companies). In Dokeos I used : function utf8_substr($str,$from,$len){ return preg_replace('#^(?:[\\x00-\\x7F]|[\\xC0-\\xFF][\\x80-\\xBF]+){0,'.$from.'}'. '((?:[\\x00-\\x7F]|[\\xC0-\\xFF][\\x80-\\xBF]+){0,'.$len.'}).*#s', '$1',$str); } And that pretty much solved everything – because the rest of the functions are not used in a “harmful” way for utf8 strings. value of mbstring.func_overload - original function overloaded function 1 - mail() - mb_send_mail() 2 - strlen() - mb_strlen() 2 - strpos() - mb_strpos() 2 - strrpos() - mb_strrpos() 2 - substr() - mb_substr() 2 - strtolower() - mb_strtolower() 2 - strtoupper() - mb_strtoupper() 2 - substr_count() - mb_substr_count() 4 - ereg() mb_ereg() 4 - eregi() - mb_eregi() 4 - ereg_replace() - mb_ereg_replace() 4 - eregi_replace() - mb_eregi_replace() 4 - split() - mb_split() I think this is all. If I remember something else I will send other emails. Also, if you have any questions, or if you want me to help in this direction, I could install a CVS system and grab the latest files from the repository and convert all the language files, database creation files etc. etc. Just let me know what are your plans and we can decide together how we can help each other :) Awaiting to hear fAn e-mail from cristi hypermedia.eu 02/10/2021 3/47 --- Hello, We’re sorry for the delay, but we’ve been pretty busy here at Hypermedia :) I could send you the whole version that I’ve modified from Dokeos 1.6.3 , but there are many modifications – customizations in fact that were needed at that moment. (if you want the whole version I modified, just say so and it will be no problem for me to send it. I just think that it will be way to complicated to follow all the modifications, because I cannot remember all the things I’ve changed :D).
Recommended publications
  • Guide De L'open Source
    GUIDE DE L'OPEN SOURCE I .T IS OPE N PREAMBULE SMILE Smile est une société d’ingénieurs experts dans la mise en œuvre de solutions open source et l’intégration de systèmes appuyés sur l’open source. Smile est membre de l’APRIL, l’association pour la promotion et la défense du logiciel libre, du PLOSS – le réseau des entreprises du Logiciel Libre en Ile-de-France et du CNLL – le conseil national du logiciel libre. Smile compte plus de 1200 collaborateurs dans le monde ce qui en fait le premier intégrateur français et européen de solutions open source. Depuis 2000, environ, Smile mène une action active de veille technologique qui lui permet de découvrir les produits les plus prometteurs de l’open source, de les qualifier et de les évaluer, de manière à proposer à ses clients les produits les plus aboutis, les plus robustes et les plus pérennes. Cette démarche a donné lieu à toute une gamme de livres blancs couvrant différents domaines d’application. La gestion de contenus (2004), les portails (2005), la business intelligence (2006), la virtualisation (2007), la gestion électronique de documents (2008), les PGIs/ERPs (2008), les VPN open source (2009), les Firewall et Contrôle de flux (2009), les Middleware orientés messages (2009), l’ecommerce et les Réseaux Sociaux d'Entreprise (2010), le Guide de l’open source et NoSQL (2011), Mobile et Recensement et audit (2012), et plus récemment Big Data et ERP open source pour l’e-commerce (2014). Chacun de ces ouvrages présente une sélection des meilleures solutions open source dans le domaine considéré, leurs qualités respectives, ainsi que des retours d’expérience opérationnels.
    [Show full text]
  • Desarrollo De Una Herramienta On-Line Para El Aprendizaje De Idiomas En Un Entorno Virtual
    Escola Tècnica Superior d’Enginyeria Informàtica Universitat Politècnica de València Desarrollo de una herramienta on-line para el aprendizaje de idiomas en un entorno virtual Trabajo Fin de Grado Grado en Ingeniería Informática Autor: Fernández Teruel, Adrián Tutor: Oliver Gil, José Salvador Cotutor: Pérez Sabater, Carmen 2016 2 Resumen El proyecto consiste en la implementación de una plataforma de aprendizaje online de idiomas con cursos de español orientados a extranjeros. Para lograr este objetivo se ha llevado a cabo un estudio del proyecto, sus características y las diferentes plataformas disponibles en el mercado que permitan su implementación. Finalmente se ha instalado y configurado la plataforma, y se han incluido los contenidos del curso. Palabras clave: plataformas online, español como segundo idioma, investigación. Abstract The project consists of the implementation of an online platform devoted to learning Spanish as a second language. To this end, we start with a comprehensive review of the research driven literature on the different online platforms available in the market for language learning, their characteristics and their implementation procedures. Finally, the chosen platform has been installed and configured to include the course contents correctly. Keywords: online platforms, Spanish as a second language, research. 3 Índice de contenidos 1. Introducción ............................................................................................................. 6 1.1. Estado de la cuestión ................................................................................
    [Show full text]
  • Forks Impacts and Motivations in Free and Open Source Projects
    (IJACSA) International Journal of Advanced Computer Science and Applications, Vol. 3, No. 2, 2012 Forks impacts and motivations in free and open source projects R. Viseur Teaching Assistant, Department of Economics and Senior Research Engineer, Centre of Excellence in Innovation Management, Information and Communication Technologies, Faculty of Engineering, University of Mons, 20, Place du 29/3, Rue des Frères Wright, Parc, 7000 Mons, Belgium. 6041 Charleroi, Belgium. Abstract— Forking is a mechanism of splitting in a community Finally we will discuss the results, and propose ways to better and is typically found in the free and open source software field. prevent forks. As a failure of cooperation in a context of open innovation, forking is a practical and informative subject of study. In-depth II. BACKGROUND researches concerning the fork phenomenon are uncommon. We therefore conducted a detailed study of 26 forks from popular A. Perception of fork free and open source projects. We created fact sheets, If the fear of forks is visible with companies, Gosain also highlighting the impact and motivations to fork. We particularly points to the sensitivity of the open source community beside point to the fact that the desire for greater technical the forks and the fragmentation of projects [10]. differentiation and problems of project governance are major sources of conflict. Bar and Fogel estimate that forks are often the result of a management mismatch [2]. They recommend forking only if Keywords- open source; free software; community, co-creation, necessary and if able to do better job. If the motivation for fork. forking is the slowness of patches release, they recommend producing patches instead.
    [Show full text]
  • Recording of the Lmss (Learning Management Systems)
    InSIDE: Including Students with Impairments in Distance Education Delivery Recording of the LMSs PR1.3 G. Kouroupetroglou1, V.Salinas2, D. Deligiorgi1, Authors K. Miesenberger2 1National and Kapodistrian University of Athens, 2Johannes Partners Kepler University Work Package WP1: Preparation Issue Date 10 October 2019 Report Status Final This project (598763-EPP-1-2018-1-EL-EPPKA2-CBHE-JP) has been co-funded by the Erasmus+ Programme of the European Commission. This publication [communication] reflects the views only of the authors, and the Commission cannot be held responsible for any use which may be made of the information contained therein Project Partners University of Macedonia National and Kapodistrian Greece University of Athens Coordinator Greece Johannes Kepler Abdelmalek Essaadi University University Austria Morocco Blida 2 University Cadi Ayyad University Algeria Morocco Mouloud Mammeri University Ibn Tofail university of Tizi-Ouzou Morocco Algeria University of Abou Bekr University of Mohammed V in Belkaid Tlemcen Rabat Algeria Morocco University of Sciences University of Sfax and Technology of Oran Tunisia Algeria University of Sousse University of Tunis El Manar Tunisia Tunisia InSIDE project Page WP1: Preparation 2018-3218 /001-001 2 Deliverable PR1.3 Recording of the LMSs Project Information Project Number 598763-EPP-1-2018-1-EL-EPPKA2-CBHE-JP Grant Agreement 2018-3218 /001-001 Number Action code CBHE-JP Project Acronym InSIDE Project Title Including Students with Impairments in Distance Education Funding Scheme Erasmus+
    [Show full text]
  • Step by Step Guide to Implementing LMS with Live Teaching
    Victor Abedi-Lartey Step by Step Guide to Implementing LMS with Live Teaching Case study: eVarsit.net Helsinki Metropolia University of Applied Sciences Degree: Bachelor of Engineering Degree Programme: Information Technology Thesis Bachelors Thesis Date. 25.04.2016 Abstract Author(s) Victor Abedi-Lartey Title Step by Step Guide to Implementing LMS with Live Teaching Number of Pages 45 pages + 4 appendices Date 25th April, 2016 Degree Bachelor of Engineering Degree Programme Information Technology Specialisation option Telecommunications/Software Instructor(s) Dr. Tero Nurminen, Principal Lecturer Nearly 100 percent of Finnish educational institutes offer some form of online studies from high school level to higher institutes. These platforms are given fancy names such as Wilma by Eira High School or Tuubi by Metropolia. Some institutes move further to offer full courses online called Virtual Open University where prospective students can accumulate credits online to prepare them towards a degree or diploma course. Degree students are also able to enroll with permission to gain some extra credits online. Using already existing LMSs students are able to access static resources in the form of recorded videos, audios or PDF files pre-uploaded as course contents to the sites. Students are able to communicate with the lecturers via chats, emails or messaging through the online Learning Management System (LMS). However, collaboration does not happen in real time therefore more students are likely to get bored along the way and drop out of the course entirely if they feel a teacher delays in responding to their questions or the course is too abstract to them and they cannot seem to get the explanation from reading the materials.
    [Show full text]
  • Guide OS 2013 EN.Pdf
    “Open source Guide The best of open source” Page 2 PREAMBLE SMILE Smile is a company of engineers specialising in the implementation of open source solutions and the integration of open source based systems. Smile is a member of APRIL, the association for the promotion and defence of open source software, PLOSS, a network of open source software companies in the Ile-de-France region, and CNLL, the French open source software council. FR Smile has a staff of over 700 throughout the world, more than 550 of whom are in France (as . at December 2012), making it the largest integrator of open source solutions in France and Europe. Since approximately 2000, Smile has been actively monitoring technological developments, SMILE which has enabled it to discover the most promising open source products, to qualify and . assess them so as to offer its clients the most successful, robust and sustainable products. This approach has led to a range of white papers covering various fields of application: content management (2004), portals (2005), business intelligence (2006), PHP frameworks (2007), virtualisation (2007), electronic document management (2008), ERPs (2008), open WWW source VPNs (2009), firewalls and flow controls (2009), message oriented middleware (2009), e-commerce and corporate social networks (2010), the Guide to Open Source and NoSQL (2011) and, more recently, mobile and open source census and compliance tools (2012). Each of these works presents a selection of the best open source solutions for the domain in question, their respective qualities as well as operational feedback. As open source solutions continue to acquire new domains, Smile will be there to help its clients benefit from these in a risk-free way.
    [Show full text]
  • Chamilo 1.10 – Guide De L'administrateur ­ Guide En Français
    Chamilo 1.10 ± Guide de l©administrateur - Guide en français Guide de l©administrateur Chamilo 1.10 29 décembre 2015 Page 1 / 134 Chamilo 1.10 ± Guide de l©administrateur - Guide en français Guide de l©administrador de Chamilo 1.10 ± Décembre 2015 Auteurs y réviseurs (sans ordre particulier) – Anaël Boulier – Yannick Warnier 29 décembre 2015 Page 2 / 134 Chamilo 1.10 ± Guide de l©administrateur - Guide en français Table des matières Chapitre 1. Introduction........................................................................................................................7 1.1. Chamilo, kesako ?.....................................................................................................................7 1.2. À propos de ce guide................................................................................................................7 1.3. À qui ce guide est-il destiné ?...................................................................................................7 1.4. Comment lire ce guide..............................................................................................................8 Chapitre 2. Installation et configuration...............................................................................................9 2.1. Serveur......................................................................................................................................9 2.2. Assistant d©installation............................................................................................................11
    [Show full text]
  • Analisi Comparativa Di Piattaforme Di Formazione a Distanza
    POLITECNICO DI TORINO III Facoltà di Ingegneria Ingegneria del Cinema e dei Mezzi di Comunicazione Tesi di Laurea Magistrale ANALISI COMPARATIVA DI PIATTAFORME DI FORMAZIONE A DISTANZA RELATORI: Prof. Fulvio Corno Prof.ssa Laura Farinetti CANDIDATO: Samuele Di Donna Anno Accademico 2013 – 2014 Ringraziamenti Vorrei ringraziare innanzi tutto i relatori prof. Fulvio Corno e prof.ssa Laura Farinetti, che mi hanno offerto la possibilità di lavorare al progetto che verrà descritto in questa tesi e che si sono impegnati nel provvedere al servizio di hosting sul quale ho potuto installare le piattaforme per i test. Un grazie più grande di tutti va a Dio che mi ha dato la grazia e la forza di poter affrontare questo percorso e di andare avanti durante tutti gli anni di duro sacrificio. Un grazie di cuore va ai miei genitori che mi hanno sostenuto durante tutto il percorso accademico con non pochi sacrifici e anche a mia sorella che mi ha tenuto spesso compagnia facendomi sentire meno solo. Grazie a tutti gli amici e compagni con cui ho condiviso questi anni; grazie al buon Luca D‟Ambrosio per gli utili consigli, grazie ai ragazzi/e della chiesa Parola della Grazia di Collegno, grazie ad Alberto Galassi mio compagno di mille peripezie durante la scrittura della tesi, ad Andrea Geremia, Simone Piva, Andrea Bianchi e tutti gli altri con i quali ho condiviso la lunga strada percorsa verso il raggiungimento di questo traguardo. Grazie a Monster Legends e Dragon City per aver arricchito le mie pause in sala studio, grazie al bar Mixto, al bar di architettura e alla macchinetta delle aule I per tutti i caffè che mi hanno tenuto sveglio; grazie a Pane e Conpanatico, al pizzettaro della piazzetta, al kebabbaro e al panzerottaro di Via Monginevro per i pasti generosamente elargiti; ringrazio infine i Vine e i prank su YouTube che hanno rallegrato le mie giornate.
    [Show full text]
  • Whitepaper on Adoption of Open Source Software in Indian Banking and Financial Sector
    WHITEPAPER ON ADOPTION OF OPEN SOURCE SOFTWARE IN INDIAN BANKING AND FINANCIAL SECTOR Institute for Development and Research in Banking Technology Explore, Enable, Excel (Established by Reserve Bank of India) Contents Executive Summary 01 1: Open Source Software: An Introduction 02 1.1 Reasons to Adopt OSS 03 1.2 Factors Affecting the Adoption 04 1.3 OSS Licensing 06 1.4 Real Time Survey with Indian Banks 07 2: Use Cases of Open Source 10 2.1 Banking Workflow Tools and Technologies 10 QuickFIX Engine for FX Trading 10 Office Suite of Apps – Libre Office 11 Real Time Channel Monitoring System (RTCMS) 11 2.2 Productivity, Analytics and MIS 13 Big Data Analysis Framework 13 Social Media Analytics – Voice in Video Feeds 15 Customer selection for Cross-selling of products using R 17 2.3 HR and IT Project management 18 Learning Management System using Moodle 18 Project Management / Change Management 20 3: Risks, Challenges and Best Practices 21 3.1 Challenges 21 3.2 Best Practices 23 4: Roadmap 25 4.1 IOSSB: IDRBT OSS Support System for Banks 25 Appendix: Comprehensive list of Open source Alternatives 27 Glossary 28 References 29 Contributors 30 © An IDRBT Publication, September20 20. All Rights Reserved. Explore, Enable, Excel FOREWORD A NY sufficiently advanced technology is indistinguishable from magic” is one of science fiction writer Arthur C. Clarke's famous laws. Technology landmarks that have dramatically altered human lifestyle include the wheel, the use of Zero, the printing press, the steam engine, electricity,transistor, radio, television and the computer and Internet. The unbelievable pace at which the last two - Computers and Internet - are evolving can be analysed from two perspectives.
    [Show full text]