CodeIgniter Forums
native language searching and support in Codeigniter - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: native language searching and support in Codeigniter (/showthread.php?tid=41462)



native language searching and support in Codeigniter - El Forum - 05-09-2011

[eluser]Hairul Azami[/eluser]
Hi guys, how the concept of content creation with a language other than UTF-8, like youtube can do a search for character "你坐着为王"

http://www.youtube.com/results?search_query=你坐着为王&aq=f


native language searching and support in Codeigniter - El Forum - 05-11-2011

[eluser]toopay[/eluser]
If, you want to accept non-standard character like above on $_GET or $_POST variable, make sure you save your controller file with UTF-8 instead ANSI Encoding.


native language searching and support in Codeigniter - El Forum - 05-11-2011

[eluser]Hairul Azami[/eluser]
What do you mean save controller file with UTF-8?
Btw, I just found this link:

http://www.haughin.com/2010/02/23/building-utf8-compatible-codeigniter-applications/

What do you think?


native language searching and support in Codeigniter - El Forum - 05-11-2011

[eluser]toopay[/eluser]
[quote author="Hairul Azami" date="1305114350"]What do you mean save controller file with UTF-8?[/quote]
Before you implementing any Multibyte String function on that article, you must ensure that your controller file (or any related file) is saved with "UTF-8" instead "ANSI" encoding. If you are using Notepad as your editor, look at 'Encoding' option (its default to ANSI) at the bottom of save dialog, if you are using Vim :wq ++enc=utf-8


native language searching and support in Codeigniter - El Forum - 05-11-2011

[eluser]Hairul Azami[/eluser]
Ok, I'm understand