List Info

Thread: note 78033 added to function.mb-convert-encoding




note 78033 added to function.mb-convert-encoding
user name
2007-09-24 23:05:34
Hey guys. For everybody who's looking for a function that is
converting an iso-string to utf8 or an utf8-string to iso,
here's your solution:

public function encodeToUtf8($string) {
     return mb_convert_encoding($string, "UTF-8",
mb_detect_encoding($string, "UTF-8, ISO-8859-1,
ISO-8859-15", true));
}

public function encodeToIso($string) {
     return mb_convert_encoding($string,
"ISO-8859-1", mb_detect_encoding($string,
"UTF-8, ISO-8859-1, ISO-8859-15", true));
}

For me these functions are working fine. Give it a try
----
Server IP: 212.124.37.9
Probable Submitter: 89.12.67.3
----
Manual Page -- http://www.php.net/manual/en/function.mb-convert-en
coding.php
Edit        -- https://master
.php.net/note/edit/78033
Del: integrated  -- h
ttps://master.php.net/note/delete/78033/integrated
Del: useless     -- http
s://master.php.net/note/delete/78033/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78033/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78033/spam
Del: non-english -- 
https://master.php.net/note/delete/78033/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78033/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78033
Reject      -- https://mast
er.php.net/note/reject/78033
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )