<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>raymond blogs...</title>
	<atom:link href="http://blog.philippinedev.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.philippinedev.com</link>
	<description>a christian web developer's random writings</description>
	<lastBuildDate>Thu, 26 Jan 2012 13:15:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Vim set file encoding</title>
		<link>http://blog.philippinedev.com/2012/01/06/vim-set-file-encoding/</link>
		<comments>http://blog.philippinedev.com/2012/01/06/vim-set-file-encoding/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 14:55:27 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[file encoding]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/?p=103</guid>
		<description><![CDATA[:set bomb :set fileencoding=utf-8]]></description>
			<content:encoded><![CDATA[<p>:set bomb<br />
:set fileencoding=utf-8</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2012/01/06/vim-set-file-encoding/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL regex update</title>
		<link>http://blog.philippinedev.com/2011/12/16/mysql-regex-update/</link>
		<comments>http://blog.philippinedev.com/2011/12/16/mysql-regex-update/#comments</comments>
		<pubDate>Fri, 16 Dec 2011 11:38:05 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/?p=100</guid>
		<description><![CDATA[Simple solution: UPDATE  table SET     words = REPLACE(words, 'brown', 'green') WHERE   words REGEXP 'brown ' OR words REGEXP ' brown' Better solution from http://techras.wordpress.com/2011/06/02/regex-replace-for-mysql/: SET sql_mode='NO_BACKSLASH_ESCAPES'; DELIMITER $$ CREATE FUNCTION `regex_replace`(pattern VARCHAR(1000),replacement VARCHAR(1000),original VARCHAR(1000)) RETURNS VARCHAR(1000) DETERMINISTIC BEGIN DECLARE temp &#8230; <a href="http://blog.philippinedev.com/2011/12/16/mysql-regex-update/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Simple solution:</p>
<pre>UPDATE  table
SET     words = REPLACE(words, 'brown', 'green')
WHERE   words REGEXP 'brown ' OR words REGEXP ' brown'</pre>
<p>Better solution from <a href="http://techras.wordpress.com/2011/06/02/regex-replace-for-mysql/">http://techras.wordpress.com/2011/06/02/regex-replace-for-mysql/</a>:</p>
<pre>SET sql_mode='NO_BACKSLASH_ESCAPES';

DELIMITER $$
CREATE FUNCTION  `regex_replace`(pattern VARCHAR(1000),replacement VARCHAR(1000),original VARCHAR(1000))

RETURNS VARCHAR(1000)
DETERMINISTIC
BEGIN
 DECLARE temp VARCHAR(1000);
 DECLARE ch VARCHAR(1);
 DECLARE i INT;
 SET i = 1;
 SET temp = '';
 IF original REGEXP pattern THEN
  loop_label: LOOP
   IF i&gt;CHAR_LENGTH(original) THEN
    LEAVE loop_label;
   END IF;
   SET ch = SUBSTRING(original,i,1);
   IF NOT ch REGEXP pattern THEN
    SET temp = CONCAT(temp,ch);
   ELSE
    SET temp = CONCAT(temp,replacement);
   END IF;
   SET i=i+1;
  END LOOP;
 ELSE
  SET temp = original;
 END IF;
 RETURN temp;
END$$
DELIMITER ;</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/12/16/mysql-regex-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Number format by country</title>
		<link>http://blog.philippinedev.com/2011/09/07/number-format-by-country/</link>
		<comments>http://blog.philippinedev.com/2011/09/07/number-format-by-country/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 18:50:25 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[i18n]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/?p=98</guid>
		<description><![CDATA[Source: International Number Formats Format Country 1,234.56 - Invariant Language (Invariant Country) ar-SA &#8211; Arabic (Saudi Arabia) zh-TW &#8211; Chinese (Taiwan) en-US &#8211; English (United States) he-IL &#8211; Hebrew (Israel) ja-JP &#8211; Japanese (Japan) ko-KR &#8211; Korean (Korea) th-TH &#8211; &#8230; <a href="http://blog.philippinedev.com/2011/09/07/number-format-by-country/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Source: <a href="http://www.codeproject.com/KB/locale/NumberFormats.aspx">International Number Formats</a></p>
<table width="640">
<thead>
<tr>
<th>Format</th>
<th>Country</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">1,234.56</td>
<td>- Invariant Language (Invariant Country)<br />
ar-SA &#8211; Arabic (Saudi Arabia)<br />
zh-TW &#8211; Chinese (Taiwan)<br />
en-US &#8211; English (United States)<br />
he-IL &#8211; Hebrew (Israel)<br />
ja-JP &#8211; Japanese (Japan)<br />
ko-KR &#8211; Korean (Korea)<br />
th-TH &#8211; Thai (Thailand)<br />
ur-PK &#8211; Urdu (Islamic Republic of Pakistan)<br />
hy-AM &#8211; Armenian (Armenia)<br />
af-ZA &#8211; Afrikaans (South Africa)<br />
hi-IN &#8211; Hindi (India)<br />
sw-KE &#8211; Kiswahili (Kenya)<br />
pa-IN &#8211; Punjabi (India)<br />
gu-IN &#8211; Gujarati (India)<br />
ta-IN &#8211; Tamil (India)<br />
te-IN &#8211; Telugu (India)<br />
kn-IN &#8211; Kannada (India)<br />
mr-IN &#8211; Marathi (India)<br />
sa-IN &#8211; Sanskrit (India)<br />
kok-IN &#8211; Konkani (India)<br />
syr-SY &#8211; Syriac (Syria)<br />
dv-MV &#8211; Divehi (Maldives)<br />
ar-IQ &#8211; Arabic (Iraq)<br />
zh-CN &#8211; Chinese (People&#8217;s Republic of China)<br />
en-GB &#8211; English (United Kingdom)<br />
es-MX &#8211; Spanish (Mexico)<br />
ar-EG &#8211; Arabic (Egypt)<br />
zh-HK &#8211; Chinese (Hong Kong S.A.R.)<br />
en-AU &#8211; English (Australia)<br />
ar-LY &#8211; Arabic (Libya)<br />
zh-SG &#8211; Chinese (Singapore)<br />
en-CA &#8211; English (Canada)<br />
es-GT &#8211; Spanish (Guatemala)<br />
ar-DZ &#8211; Arabic (Algeria)<br />
zh-MO &#8211; Chinese (Macao S.A.R.)<br />
en-NZ &#8211; English (New Zealand)<br />
ar-MA &#8211; Arabic (Morocco)<br />
en-IE &#8211; English (Ireland)<br />
es-PA &#8211; Spanish (Panama)<br />
ar-TN &#8211; Arabic (Tunisia)<br />
en-ZA &#8211; English (South Africa)<br />
es-DO &#8211; Spanish (Dominican Republic)<br />
ar-OM &#8211; Arabic (Oman)<br />
en-JM &#8211; English (Jamaica)<br />
ar-YE &#8211; Arabic (Yemen)<br />
en-029 &#8211; English (Caribbean)<br />
ar-SY &#8211; Arabic (Syria)<br />
en-BZ &#8211; English (Belize)<br />
es-PE &#8211; Spanish (Peru)<br />
ar-JO &#8211; Arabic (Jordan)<br />
en-TT &#8211; English (Trinidad and Tobago)<br />
ar-LB &#8211; Arabic (Lebanon)<br />
en-ZW &#8211; English (Zimbabwe)<br />
ar-KW &#8211; Arabic (Kuwait)<br />
en-PH &#8211; English (Republic of the Philippines)<br />
ar-AE &#8211; Arabic (U.A.E.)<br />
ar-BH &#8211; Arabic (Bahrain)<br />
ar-QA &#8211; Arabic (Qatar)<br />
es-SV &#8211; Spanish (El Salvador)<br />
es-HN &#8211; Spanish (Honduras)<br />
es-NI &#8211; Spanish (Nicaragua)<br />
es-PR &#8211; Spanish (Puerto Rico)<br />
zu-ZA &#8211; Zulu (South Africa)<br />
xh-ZA &#8211; Xhosa (South Africa)<br />
tn-ZA &#8211; Tswana (South Africa)<br />
quz-PE &#8211; Quechua (Peru)<br />
cy-GB &#8211; Welsh (United Kingdom)<br />
fil-PH &#8211; Filipino (Philippines)<br />
iu-Latn-CA &#8211; Inuktitut (Latin) (Canada)<br />
mi-NZ &#8211; Maori (New Zealand)<br />
ga-IE &#8211; Irish (Ireland)<br />
moh-CA &#8211; Mohawk (Canada)<br />
ns-ZA &#8211; Northern Sotho (South Africa)<br />
mt-MT &#8211; Maltese (Malta)</td>
</tr>
<tr>
<td valign="top">1.234,56</td>
<td>ca-ES &#8211; Catalan (Catalan)<br />
da-DK &#8211; Danish (Denmark)<br />
de-DE &#8211; German (Germany)<br />
el-GR &#8211; Greek (Greece)<br />
is-IS &#8211; Icelandic (Iceland)<br />
it-IT &#8211; Italian (Italy)<br />
nl-NL &#8211; Dutch (Netherlands)<br />
pt-BR &#8211; Portuguese (Brazil)<br />
ro-RO &#8211; Romanian (Romania)<br />
hr-HR &#8211; Croatian (Croatia)<br />
sq-AL &#8211; Albanian (Albania)<br />
sv-SE &#8211; Swedish (Sweden)<br />
tr-TR &#8211; Turkish (Turkey)<br />
id-ID &#8211; Indonesian (Indonesia)<br />
sl-SI &#8211; Slovenian (Slovenia)<br />
lt-LT &#8211; Lithuanian (Lithuania)<br />
vi-VN &#8211; Vietnamese (Vietnam)<br />
eu-ES &#8211; Basque (Basque)<br />
mk-MK &#8211; Macedonian (Former Yugoslav Republic of Macedonia)<br />
fo-FO &#8211; Faroese (Faroe Islands)<br />
ms-MY &#8211; Malay (Malaysia)<br />
gl-ES &#8211; Galician (Galician)<br />
fr-BE &#8211; French (Belgium)<br />
nl-BE &#8211; Dutch (Belgium)<br />
pt-PT &#8211; Portuguese (Portugal)<br />
sr-Latn-CS &#8211; Serbian (Latin, Serbia)<br />
ms-BN &#8211; Malay (Brunei Darussalam)<br />
de-AT &#8211; German (Austria)<br />
es-ES &#8211; Spanish (Spain)<br />
sr-Cyrl-CS &#8211; Serbian (Cyrillic, Serbia)<br />
de-LU &#8211; German (Luxembourg)<br />
es-CR &#8211; Spanish (Costa Rica)<br />
es-VE &#8211; Spanish (Venezuela)<br />
es-CO &#8211; Spanish (Colombia)<br />
es-AR &#8211; Spanish (Argentina)<br />
es-EC &#8211; Spanish (Ecuador)<br />
es-CL &#8211; Spanish (Chile)<br />
es-UY &#8211; Spanish (Uruguay)<br />
es-PY &#8211; Spanish (Paraguay)<br />
es-BO &#8211; Spanish (Bolivia)<br />
sr-Cyrl-BA &#8211; Serbian (Cyrillic) (Bosnia and Herzegovina)<br />
fy-NL &#8211; Frisian (Netherlands)<br />
se-SE &#8211; Sami (Northern) (Sweden)<br />
sma-SE &#8211; Sami (Southern) (Sweden)<br />
hr-BA &#8211; Croatian (Bosnia and Herzegovina)<br />
bs-Latn-BA &#8211; Bosnian (Bosnia and Herzegovina)<br />
bs-Cyrl-BA &#8211; Bosnian (Cyrillic) (Bosnia and Herzegovina)<br />
arn-CL &#8211; Mapudungun (Chile)<br />
quz-EC &#8211; Quechua (Ecuador)<br />
sr-Latn-BA &#8211; Serbian (Latin) (Bosnia and Herzegovina)<br />
smj-SE &#8211; Sami (Lule) (Sweden)<br />
quz-BO &#8211; Quechua (Bolivia)</td>
</tr>
<tr>
<td valign="top">1&#8217;234.56</td>
<td>de-CH &#8211; German (Switzerland)<br />
it-CH &#8211; Italian (Switzerland)<br />
fr-CH &#8211; French (Switzerland)<br />
de-LI &#8211; German (Liechtenstein)<br />
rm-CH &#8211; Romansh (Switzerland)</td>
</tr>
<tr>
<td valign="top">1 234,56</td>
<td>bg-BG &#8211; Bulgarian (Bulgaria)<br />
cs-CZ &#8211; Czech (Czech Republic)<br />
fi-FI &#8211; Finnish (Finland)<br />
fr-FR &#8211; French (France)<br />
hu-HU &#8211; Hungarian (Hungary)<br />
nb-NO &#8211; Norwegian, Bokmål (Norway)<br />
pl-PL &#8211; Polish (Poland)<br />
ru-RU &#8211; Russian (Russia)<br />
sk-SK &#8211; Slovak (Slovakia)<br />
uk-UA &#8211; Ukrainian (Ukraine)<br />
be-BY &#8211; Belarusian (Belarus)<br />
lv-LV &#8211; Latvian (Latvia)<br />
az-Latn-AZ &#8211; Azeri (Latin, Azerbaijan)<br />
ka-GE &#8211; Georgian (Georgia)<br />
uz-Latn-UZ &#8211; Uzbek (Latin, Uzbekistan)<br />
tt-RU &#8211; Tatar (Russia)<br />
mn-MN &#8211; Mongolian (Cyrillic, Mongolia)<br />
nn-NO &#8211; Norwegian, Nynorsk (Norway)<br />
sv-FI &#8211; Swedish (Finland)<br />
az-Cyrl-AZ &#8211; Azeri (Cyrillic, Azerbaijan)<br />
uz-Cyrl-UZ &#8211; Uzbek (Cyrillic, Uzbekistan)<br />
fr-CA &#8211; French (Canada)<br />
fr-LU &#8211; French (Luxembourg)<br />
fr-MC &#8211; French (Principality of Monaco)<br />
sma-NO &#8211; Sami (Southern) (Norway)<br />
smn-FI &#8211; Sami (Inari) (Finland)<br />
se-FI &#8211; Sami (Northern) (Finland)<br />
sms-FI &#8211; Sami (Skolt) (Finland)<br />
smj-NO &#8211; Sami (Lule) (Norway)<br />
lb-LU &#8211; Luxembourgish (Luxembourg)<br />
se-NO &#8211; Sami (Northern) (Norway)</td>
</tr>
<tr>
<td valign="top">1,234/56</td>
<td>fa-IR &#8211; Persian (Iran)</td>
</tr>
<tr>
<td valign="top">1 234-56</td>
<td>kk-KZ &#8211; Kazakh (Kazakhstan)<br />
ky-KG &#8211; Kyrgyz (Kyrgyzstan)</td>
</tr>
<tr>
<td valign="top">1 234.56</td>
<td>et-EE &#8211; Estonian (Estonia)</td>
</tr>
</tbody>
</table>
<p>Thanks to <strong><a id="ctl00_AboutAuthorRptr_ctl00_AboutAuthor_memberProfileLink" href="http://www.codeproject.com/Members/Igor-Krupitsky">Igor Krupitsky</a>.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/09/07/number-format-by-country/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash: getting confirmation to continue or exit</title>
		<link>http://blog.philippinedev.com/2011/09/07/bash-getting-confirmation-to-continue-or-exit/</link>
		<comments>http://blog.philippinedev.com/2011/09/07/bash-getting-confirmation-to-continue-or-exit/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 17:20:40 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/?p=93</guid>
		<description><![CDATA[&#160; #!/bin/bash while true do read -r -p 'Are you sure? ' choice case "$choice" in y&#124;Y) echo "Processing..." break ;; n&#124;N) echo "Canceled." exit ;; esac done echo "Complete."]]></description>
			<content:encoded><![CDATA[<p>&nbsp;</p>
<pre>#!/bin/bash

while true
do
    read -r -p 'Are you sure? ' choice
    case "$choice" in
       y|Y)
           echo "Processing..."
           break
       ;;

       n|N)
           echo "Canceled."
           exit
      ;;
    esac
done

echo "Complete."</pre>
<p><span style="font-family: Monaco, Consolas, 'Andale Mono', 'DejaVu Sans Mono', monospace; font-size: x-small;"><span class="Apple-style-span" style="line-height: 19px;"><br />
</span></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/09/07/bash-getting-confirmation-to-continue-or-exit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Currency Internationalization (i18n), Multiple Currencies and Foreign Exchange (FX)</title>
		<link>http://blog.philippinedev.com/2011/09/07/currency-internationalization-i18n-multiple-currencies-and-foreign-exchange-fx/</link>
		<comments>http://blog.philippinedev.com/2011/09/07/currency-internationalization-i18n-multiple-currencies-and-foreign-exchange-fx/#comments</comments>
		<pubDate>Tue, 06 Sep 2011 16:34:12 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[web]]></category>
		<category><![CDATA[i18n]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/?p=91</guid>
		<description><![CDATA[Currency Internationalization (i18n), Multiple Currencies and Foreign Exchange (FX)]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.xencraft.com/resources/multi-currency.html">Currency Internationalization (i18n), Multiple Currencies and Foreign Exchange (FX)</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/09/07/currency-internationalization-i18n-multiple-currencies-and-foreign-exchange-fx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multibyte PHP Functions</title>
		<link>http://blog.philippinedev.com/2011/09/06/multibyte-php-functions/</link>
		<comments>http://blog.philippinedev.com/2011/09/06/multibyte-php-functions/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 16:14:46 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[i18n]]></category>
		<category><![CDATA[multibyte]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/?p=89</guid>
		<description><![CDATA[Source: Using Multi-Byte Character Sets in PHP (Unicode, UTF-8, etc) The following list details the PHP string functions which could cause problems when handling multi-byte strings. The multi-byte safe alternative is given when available: mail() Try mb_send_mail() instead. strlen() Try mb_strlen() instead. strpos() Try mb_strpos() instead. &#8230; <a href="http://blog.philippinedev.com/2011/09/06/multibyte-php-functions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Source: <a href="http://www.rdeeson.com/weblog/61/using-multi-byte-character-sets-in-php-unicode-utf-8-etc.html">Using Multi-Byte Character Sets in PHP (Unicode, UTF-8, etc)</a></p>
<p>The following list details the PHP string functions which could cause problems when handling multi-byte strings. The multi-byte safe alternative is given when available:</p>
<div><a href="http://uk2.php.net/mail">mail()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-send-mail.php">mb_send_mail()</a> instead.</div>
<div><a href="http://uk2.php.net/strlen">strlen()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-strlen.php">mb_strlen()</a> instead.</div>
<div><a href="http://uk2.php.net/strpos">strpos()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-strpos.php">mb_strpos()</a> instead.</div>
<div><a href="http://uk2.php.net/strrpos">strrpos()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-strrpos.php">mb_strrpos()</a> instead.</div>
<div><a href="http://uk2.php.net/substr">substr()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-substr.php">mb_substr()</a> instead.</div>
<div><a href="http://uk2.php.net/strtolower">strtolower()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-strtolower.php">mb_strtolower()</a> instead.</div>
<div><a href="http://uk2.php.net/strtoupper">strtoupper()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-strtoupper.php">mb_strtoupper()</a> instead.</div>
<div><a href="http://uk2.php.net/substr_count">substr_count()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-substr-count.php">mb_substr_count()</a> instead.</div>
<div><a href="http://uk2.php.net/ereg">ereg()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-ereg.php">mb_ereg()</a> instead.</div>
<div><a href="http://uk2.php.net/eregi">eregi()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-eregi.php">mb_eregi()</a> instead.</div>
<div><a href="http://uk2.php.net/ereg_replace">ereg_replace()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-ereg-replace.php">mb_ereg_replace()</a> instead.</div>
<div><a href="http://uk2.php.net/eregi_replace">eregi_replace()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-eregi-replace.php">mb_eregi_replace()</a> instead.</div>
<div><a href="http://uk2.php.net/preg_match">preg_match()</a> Please investigate the /u option, as that provides UTF-8 awareness. The preg_* functions are contentious, because careful use can be safe. If you are unsure what to do, see <a href="http://uk2.php.net/manual/en/function.mb-eregi.php">mb_eregi()</a> as a possible replacement.</div>
<div><a href="http://uk2.php.net/preg_replace">preg_replace()</a> Please investigate the /u option, as that provides UTF-8 awareness. The preg_* functions are contentious, because careful use can be safe. If you are unsure what to do, see <a href="http://uk2.php.net/manual/en/function.mb-ereg-replace.php">mb_ereg_replace()</a> as a possible replacement.</div>
<div><a href="http://uk2.php.net/split">split()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-split.php">mb_split()</a> instead.</div>
<div><a href="http://uk2.php.net/explode">explode()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-split.php">mb_split()</a> instead.</div>
<div><a href="http://uk2.php.net/stripos">stripos()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-stripos.php">mb_stripos()</a> instead.</div>
<div><a href="http://uk2.php.net/stristr">stristr()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-stristr.php">mb_stristr()</a> instead.</div>
<div><a href="http://uk2.php.net/strrchr">strrchr()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-strrchr.php">mb_strrchr()</a> instead.</div>
<div><a href="http://uk2.php.net/strripos">strripos()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-strripos.php">mb_strripos()</a> instead.</div>
<div><a href="http://uk2.php.net/strstr">strstr()</a> Try <a href="http://uk2.php.net/manual/en/function.mb-strstr.php">mb_strstr()</a> instead.</div>
<div><a href="http://uk2.php.net/strrev">strrev()</a> ?</div>
<div><a href="http://uk2.php.net/wordwrap">wordwrap()</a> ?</div>
<div><a href="http://uk2.php.net/chunk_split">chunk_split()</a> ?</div>
<div><a href="http://uk2.php.net/ucfirst">ucfirst()</a> ?</div>
<div><a href="http://uk2.php.net/lcfirst">lcfirst()</a> This function is flagged because its companion function (ucfirst) is not safe. However, this function is untested.</div>
<div><a href="http://uk2.php.net/trim">trim()</a>, <a href="http://uk2.php.net/rtrim">rtrim()</a> and<a href="http://uk2.php.net/ltrim">ltrim()</a> May be multi-byte safe if you use UTF-8 only (multi-byte UTF-8 characters contain no byte sequences that resemble white space). Avoid UTF-16 &amp; UTF-32, among others.</div>
<div><a href="http://uk2.php.net/strip_tags">strip_tags()</a> It may be multi-byte safe if you use UTF-8 only (multi-byte UTF-8 characters contain no byte sequences that resemble less-than or greater-than symbols). Avoid UTF-16 &amp; UTF-32, among others.</div>
<div><a href="http://uk2.php.net/ucwords">ucwords()</a> Try this code instead:</p>
<pre>$str = <a href="http://uk2.php.net/mb_convert_case">mb_convert_case($str, MB_CASE_TITLE, "UTF-8")</a>;</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/09/06/multibyte-php-functions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Force secure browsing https</title>
		<link>http://blog.philippinedev.com/2011/09/01/force-secure-browsing-https/</link>
		<comments>http://blog.philippinedev.com/2011/09/01/force-secure-browsing-https/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 15:26:27 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/?p=85</guid>
		<description><![CDATA[RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteCond %{REQUEST_URI} dir RewriteRule ^(.*)$ https://www.example.com/dir/$1 [R,L]]]></description>
			<content:encoded><![CDATA[<p>RewriteEngine On<br />
RewriteCond %{SERVER_PORT} 80<br />
RewriteCond %{REQUEST_URI} dir<br />
RewriteRule ^(.*)$ https://www.example.com/dir/$1 [R,L]</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/09/01/force-secure-browsing-https/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Vim: set Caps Lock as Ctrl, set Pause as Caps Lock, let Esc be Esc</title>
		<link>http://blog.philippinedev.com/2011/08/28/vim-set-caps-lock-as-ctrl-set-pause-as-caps-lock-let-esc-be-esc/</link>
		<comments>http://blog.philippinedev.com/2011/08/28/vim-set-caps-lock-as-ctrl-set-pause-as-caps-lock-let-esc-be-esc/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 17:18:38 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[caps lock key]]></category>
		<category><![CDATA[esc key]]></category>
		<category><![CDATA[pause key]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/2011/08/28/vim-set-caps-lock-as-ctrl-set-pause-as-caps-lock-let-esc-be-esc/</guid>
		<description><![CDATA[raymond@ubuntu:~$ cat .Xmodmap remove Lock = Caps_Lock remove Control = Control_L keysym Caps_Lock = Control_L keysym Pause = Caps_Lock add Lock = Caps_Lock add Control = Control_L]]></description>
			<content:encoded><![CDATA[<p><code>raymond@ubuntu:~$ cat .Xmodmap<br />
remove Lock = Caps_Lock<br />
remove Control = Control_L<br />
keysym Caps_Lock = Control_L<br />
keysym Pause = Caps_Lock<br />
add Lock = Caps_Lock<br />
add Control = Control_L</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/08/28/vim-set-caps-lock-as-ctrl-set-pause-as-caps-lock-let-esc-be-esc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP i18n using gettext</title>
		<link>http://blog.philippinedev.com/2011/08/07/php-i18n-using-gettext/</link>
		<comments>http://blog.philippinedev.com/2011/08/07/php-i18n-using-gettext/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 19:16:05 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[Useful links]]></category>
		<category><![CDATA[gettext]]></category>
		<category><![CDATA[i18n]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/2011/08/07/php-i18n-using-gettext/</guid>
		<description><![CDATA[Localizing PHP web sites using gettext Setup i18n gettext in your PHP application Benchmarking PHP Localization – Is gettext fast enough?]]></description>
			<content:encoded><![CDATA[<p><a href="http://mel.melaxis.com/devblog/2005/08/06/localizing-php-web-sites-using-gettext/">Localizing PHP web sites using gettext</a></p>
<p><a href="http://theclimber.fritalk.com/post/2009/09/16/i18n-gettext-for-your-PHP-application">Setup i18n gettext in your PHP application</a></p>
<p><a href="http://mel.melaxis.com/devblog/2006/04/10/benchmarking-php-localization-is-gettext-fast-enough/">Benchmarking PHP Localization – Is gettext fast enough?</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/08/07/php-i18n-using-gettext/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Inserting a troublesome string from PHP to Javascript</title>
		<link>http://blog.philippinedev.com/2011/08/07/inserting-a-troublesome-string-from-php-to-javascript/</link>
		<comments>http://blog.philippinedev.com/2011/08/07/inserting-a-troublesome-string-from-php-to-javascript/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 19:06:15 +0000</pubDate>
		<dc:creator>Raymond</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://blog.philippinedev.com/2011/08/07/inserting-a-troublesome-string-from-php-to-javascript/</guid>
		<description><![CDATA[&#60;script type=&#8221;text/javascript&#8221;&#62; alert(&#8220;&#60;?php echo preg_replace(&#8220;/\r?\n/&#8221;, &#8220;\\n&#8221;, addslashes($message)); ?&#62;&#8221;); &#60;/script&#62;  Passing variables to Javascript]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="border-collapse: separate; color: #000000; font-family: 'Times New Roman'; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; font-size: medium"><span class="Apple-style-span" style="color: #333333; font-family: monospace; font-size: 12px; white-space: pre">&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
alert(&#8220;&lt;?php echo <a href="http://www.php.net/preg_replace" target="_blank" style="color: green">preg_replace</a>(&#8220;/\r?\n/&#8221;, &#8220;\\n&#8221;, <a href="http://www.php.net/addslashes" target="_blank" style="color: green">addslashes</a>($message)); ?&gt;&#8221;);<br />
&lt;/script&gt;</span></span></p>
<p><a href="http://www.the-art-of-web.com/php/javascript-escape/"> Passing variables to Javascript</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippinedev.com/2011/08/07/inserting-a-troublesome-string-from-php-to-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

