{"id":15308097,"url":"https://github.com/ivantcholakov/codeigniter-utf8","last_synced_at":"2025-04-15T00:54:37.790Z","repository":{"id":10995237,"uuid":"13316878","full_name":"ivantcholakov/codeigniter-utf8","owner":"ivantcholakov","description":"UTF-8 string support for CodeIgniter based on Kohana's implementation.","archived":false,"fork":false,"pushed_at":"2020-11-27T12:35:46.000Z","size":34,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-15T00:54:31.915Z","etag":null,"topics":["codeigniter","php","utf8"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ivantcholakov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-10-04T05:10:35.000Z","updated_at":"2022-06-30T17:27:49.000Z","dependencies_parsed_at":"2022-09-23T12:42:29.813Z","dependency_job_id":null,"html_url":"https://github.com/ivantcholakov/codeigniter-utf8","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-utf8","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-utf8/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-utf8/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ivantcholakov%2Fcodeigniter-utf8/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ivantcholakov","download_url":"https://codeload.github.com/ivantcholakov/codeigniter-utf8/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248986279,"owners_count":21194025,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codeigniter","php","utf8"],"created_at":"2024-10-01T08:13:52.551Z","updated_at":"2025-04-15T00:54:37.763Z","avatar_url":"https://github.com/ivantcholakov.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"UTF-8 for CodeIgniter\n=====================\n\nUTF-8 string support for CodeIgniter based on Kohana's implementation.\n\nThis feature is provided by the class UTF8. Its methods are UTF-8 compatible alternatives to the following PHP string functions:\n\n    ltrim()\n    ord()\n    rtrim()\n    strcasecmp()\n    strcspn()\n    str_ireplace()\n    stristr()\n    strlen()\n    str_pad()\n    strpos()\n    strrev()\n    strrpos()\n    str_split()\n    strspn()\n    stripos()\n    strtolower()\n    strtoupper()\n    substr()\n    substr_replace()\n    trim()\n    ucfirst()\n    ucwords()\n    wordwrap()\n\nThere are also some other useful methods, browse code to get familiar with them.\n\nInstallation\n------------\n\n1. Preview the file application/third_party/kohana/utf8/Kohana_UTF8.php and check the technical requirements described there. This feature has been tested with CodeIgniter 3.0.0-dev, also, it is expected to work on CodeIgniter 2.x.\n2. Move the content of the directories application/classes, application/hooks, application/third_party/kohana to their corresponding places in your CodeIgniter based site.\n3. Copy the setting from the file application/config/hooks.php and paste it inside the corresponding file in your site application/config/hooks.php. This (additional) hook is to register a class autoloader.\n4. In your site open the file application/config/config.php and find the setting $config['enable_hooks']. Set it to TRUE.\n5. Test the instalation with the example below.\n\nAn Example for Quick Testing\n----------------------------\n\n```php\n$string = 'Iñtërnâtiônàlizætiøn';\n\necho UTF8::strlen($string);\n// Expected result: 20\n\necho '\u003cbr /\u003e';\n\necho UTF8::substr($string, 0, 10) . UTF8::substr($string, 10);\n// Expected result: Iñtërnâtiônàlizætiøn\n```\n\nLicense Information\n-------------------\n\n* For the original code about adaptation to CodeIgniter:  \nAuthor: Ivan Tcholakov \u003civantcholakov@gmail.com\u003e, 2013-2020  \nLicense: The MIT License, http://opensource.org/licenses/MIT\n\n* For Kohana team's code:  \nLicense: GNU LGPL 2.1, http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantcholakov%2Fcodeigniter-utf8","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fivantcholakov%2Fcodeigniter-utf8","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fivantcholakov%2Fcodeigniter-utf8/lists"}