utf-8 컨버팅 iconv 대신에...

iconv( "utf-8", "euc-kr", $oivsObject->userNm)

mb_convert_encoding($oivsObject->userNm, "euc-kr", "utf-8")


mb_convert_encoding
(PHP 4 >= 4.0.6, PHP 5)

mb_convert_encoding -- Convert character encoding
Description
string mb_convert_encoding ( string str, string to-encoding [, mixed from-encoding])


mb_convert_encoding() converts character encoding of string str from from-encoding to to-encoding.

str : String to be converted.

from-encoding is specified by character code name before conversion. it can be array or string - comma separated enumerated list. If it is not specified, the internal encoding will be used.

예 1. mb_convert_encoding() example

< ?php
/ * Convert internal character encoding to SJIS */
$str = mb_convert_encoding($str, "SJIS");

/ * Convert EUC-JP to UTF-7 */
$str = mb_convert_encoding($str, "UTF-7", "EUC-JP");

/ * Auto detect encoding from JIS, eucjp-win, sjis-win, then convert str to UCS-2LE */
$str = mb_convert_encoding($str, "UCS-2LE", "JIS, eucjp-win, sjis-win");

/ * "auto" is expanded to "ASCII,JIS,UTF-8,EUC-JP,SJIS" */
$str = mb_convert_encoding($str, "EUC-JP", "auto");
?>
크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기

Posted by 홍반장

2007/01/08 16:41 2007/01/08 16:41
Response
No Trackback , No Comment
RSS :
http://tcbs17.cafe24.com/tc/rss/response/2198

Trackback URL : http://tcbs17.cafe24.com/tc/trackback/2198

« Previous : 1 : ... 636 : 637 : 638 : 639 : 640 : 641 : 642 : 643 : 644 : ... 1009 : Next »

블로그 이미지

- 홍반장

Archives

Recent Trackbacks

Calendar

«   2024/11   »
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Statistics Graph

Site Stats

Total hits:
240859
Today:
655
Yesterday:
856