CodeIgniter Forums
Codeigniter 1.7.2 UTF-8 Edition - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22)
+--- Thread: Codeigniter 1.7.2 UTF-8 Edition (/showthread.php?tid=25691)

Pages: 1 2 3 4 5 6


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-21-2009

[eluser]Sbioko[/eluser]
Finally, you don't need to wait for an implementation of UTF-8 in CI 2.0! Just unzip this package into your system folder! Make sure, that you made a backup of all your files. I'm not responsible for any consequences of using this package!

Here is the link

UPD: Oops, I forgot! You must replace your index.php too! This is important!

UPD2: Please, someone, test it on PHP 4. I have tested it only on PHP 5.3.0! Thank you.


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-22-2009

[eluser]Sbioko[/eluser]
Nobody needs this?


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-22-2009

[eluser]Bojan Sudarević[/eluser]
Thanks Demedes! I'm new to CodeIgniter, but I believe that this will be very useful to me!

Cheers,
Bojan


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-22-2009

[eluser]Johan André[/eluser]
[quote author="Demedes" date="1261515288"]Nobody needs this?[/quote]

Not really, no!
Does it change ANY files in the system-folder?


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-23-2009

[eluser]Sbioko[/eluser]
[quote author="Bojan Sudarević" date="1261539063"]Thanks Demedes! I'm new to CodeIgniter, but I believe that this will be very useful to me!
[/quote]
Thank you for a good reply! Good luck in coding! If you will have any questions about it, just send me a PM!

This package changes all system files and index.php too!


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-23-2009

[eluser]Phil Sturgeon[/eluser]
I'm behind a restrictive proxy so I cannot download, but I am still intrigued. What have you actually done here? I have been using CodeIgniter to work with UTF-8 strings and never come across any problems.


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-23-2009

[eluser]Sbioko[/eluser]
In this package I implemented full UTF-8 support using the phputf8 library. A few weeks ago, I did something like in your tutorial, but with cyrilical symbols, it doesn't work! So, I decided to develop Codeigniter UTF-8 Edition. I'm very proud of this :-)

UPD: If you need this, I can upload this package to any file uploading service you want!


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-23-2009

[eluser]Phil Sturgeon[/eluser]
It works fine with mbstring and I would rather install a package than download an unofficial copy of CodeIgniter.

Your special version of CodeIgniter is using this phputf8 package, and you have replaced EVERY string function with these functions?


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-23-2009

[eluser]Sbioko[/eluser]
Quote:Your special version of CodeIgniter is using this phputf8 package, and you have replaced EVERY string function with these functions?
Yes.

Quote:It works fine with mbstring and I would rather install a package than download an unofficial copy of CodeIgniter.
It will be work fine only with mbstring and with mbstring's functions overload.


Codeigniter 1.7.2 UTF-8 Edition - El Forum - 12-23-2009

[eluser]coolgeek[/eluser]
[quote author="Phil Sturgeon" date="1261600064"]I'm behind a restrictive proxy so I cannot download, but I am still intrigued. What have you actually done here? I have been using CodeIgniter to work with UTF-8 strings and never come across any problems.[/quote]

Phil - I just tried to post this on your blog, but I think I had trouble with your captcha.

You wrote (and others have written similarly) "CodeIgniter by default is set to use UTF-8 for much of its internal functionality". Yet, in the process of refactoring an app that I'm readying for production, I've noticed that the CI code itself does not seem to use the mb_ string functions. For example, substr() is used 112 times, but mb_substr() is not used at all.

I'm new to l10n/i18n, so perhaps I am confused by your pointers to mb_ references. Were they just for background, or do I in fact need to use the mb_functions? If the latter, why isn't the CI code using them?

Also, what are your thoughts on this:

http://hash-bang.net/2009/02/utf8-with-codeigniter/

Is this unnecessary with CI and MySQL configured as you have laid out on your blog? Or is this useful in addition to your directions? Or can this be used in lieu of the mb_ functions?

Thanks