Friday, June 15, 2012

How to install drivers for the Arduino Uno with Windows7

To use Arduino Uno and upload programs to Arduino Uno with sucess, you need three steps:
  1. Plug in Arduino Uno to PC via USB;
  2. Download Arduino IDE;
  3. Install Arduino Uno Driver;

Please see the next video how to install drivers correctly.

Did you like this video? Please give me your feedback...

Friday, June 1, 2012

Decoding sign Euro in HTML & PHP

Probably you had a problem to show a Euro sign on a web page like on the next figure.

Code source:

        <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
        $str = "Price: 99,99€";
        echo htmlentities($str)."<br />";
        echo html_entity_decode($str)."<br />";

It happens because web page can have a charset setted UTF-8  (<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">or a ISO-8859-1 (<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">). 
To show correctly sign Euro, you must set charset ISO-8859-15 (<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15">) as you can see next picture.

Besides you set charset ISO-8859-15, you must use PHP function html_entity_decode(string) but must not use PHP function htmlentities(string).