How To Configure PHP To Support Korean Encode

In This Tutorial i want to configure my PHP to support korean encode.
here is a short tutorial how to do that

In order to support other encode we need to reconfigure PHP with mbstring

Login into the server as root

Configure PHP 5.3.0 with mbstring

#cd /root/php-5.3.0
#./configure  --enable-mbstring
#make && make install

Modify php.ini

#vi /etc/php.ini

###change few lines below ###
default_charset = EUC-KR

[mbstring]
mbstring.language = Korean
mbstring.internal_encoding = EUC-KR
mbstring.http_input = auto
mbstring.http_output = EUC-KR
mbstring.encoding_translation = On
mbstring.detect_order = auto
mbstring.substitute_character = none;  

### leave others php setting default ####

Note :
if you don't know where is your php.ini
you can verify it by this command below

#php -i |grep php.ini
Configuration File (php.ini) Path => /etc
Scan this dir for additional .ini files => (none)
additional .ini files parsed => (none)

Restart Apache Webserver

#/usr/local/apache/bin/apachectl stop
#/usr/local/apache/bin/apachectl start

 

Facebook Fans