@@ 109-124 (lines=16) @@ | ||
106 | * @param string $from |
|
107 | * @return array|string |
|
108 | */ |
|
109 | function bookmark_convert_encoding($str, $to = 'SJIS', $from = _CHARSET) |
|
110 | { |
|
111 | if (function_exists('mb_convert_encoding')) { |
|
112 | if (is_array($str)) { |
|
113 | foreach ($str as $key => $val) { |
|
114 | $str[$key] = bookmark_convert_encoding($val, $to, $from); |
|
115 | } |
|
116 | ||
117 | return $str; |
|
118 | } else { |
|
119 | return mb_convert_encoding($str, $to, $from); |
|
120 | } |
|
121 | } else { |
|
122 | return $str; |
|
123 | } |
|
124 | } |
|
125 | ||
126 | /** |
|
127 | * @param string $data |
@@ 106-121 (lines=16) @@ | ||
103 | * @param string $from |
|
104 | * @return array|string |
|
105 | */ |
|
106 | function mylinks_qrcode_convert_encoding($str, $to = 'SJIS', $from = _CHARSET) |
|
107 | { |
|
108 | if (function_exists('mb_convert_encoding')) { |
|
109 | if (is_array($str)) { |
|
110 | foreach ($str as $key => $val) { |
|
111 | $str[$key] = mylinks_qrcode_convert_encoding($val, $to, $from); |
|
112 | } |
|
113 | ||
114 | return $str; |
|
115 | } else { |
|
116 | return mb_convert_encoding($str, $to, $from); |
|
117 | } |
|
118 | } else { |
|
119 | return $str; |
|
120 | } |
|
121 | } |
|
122 | ||
123 | /** |
|
124 | * @param string $data |