UTF-8 charset not applying On a PHP project, in which header is imported trough PHP, special characters such as "ñ" or "á" do not appear.  Database is correctly encoded as UTF8-general-ci, and these characters display correctly inside the database. The issue is that when showing them on the site, all special characters look like this (it shoul be Germán Álvarez):    Is this because of importing head trough PHP (as seen abobe), instead of placing it directly on each PHP file? How can I solve this?  Header import code:  ......  &lt;html&gt;  &lt;?php     include("../modules/head.php"); ?&gt;      &lt;body&gt;    ......   Code inside file modules/head.php:  &lt;head&gt;     &lt;meta charset="UTF-8" /&gt;     &lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"&gt;      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;      &lt;title&gt;Waisap | Sistema de mensajería interactivo &lt;/title&gt;     &lt;meta name="description" content="-----" /&gt;     &lt;meta name="keywords" content="" /&gt;     &lt;meta name="author" content="-----" /&gt;     &lt;link rel="shortcut icon" href="../img/basics/favicon.ico"&gt;     &lt;link rel="stylesheet" type="text/css" href="../css/style.css" /&gt;     &lt;script src="../js/modernizr.custom.js"&gt;&lt;/script&gt;     &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"&gt;&lt;/script&gt;  &lt;/head&gt;
UTF-8 all the way through I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.
Create an object with dynamic property names folder content doesn't get refreshed automatically in ubuntu 14.04 I'm using Ubuntu 14.04 and when I'm doing experiments which creates new files inside a particular folder X. But I can't see these new files inside X without refreshing X.  I have increased the count to 1M in  /proc/sys/fs/inotify/max_user_watches   but still the issue is not fixed.   How to fix it?  EDIT As suggested, output of cat /etc/xdg/autostart/user-dirs-update-gtk.desktop  [Desktop Entry] Encoding=UTF-8 Exec=xdg-user-dirs-gtk-update Name=User folders update Comment=Update common folders names to match current locale Terminal=false OnlyShowIn=GNOME;LXDE;Unity; Type=Application StartupNotify=false X-KDE-autostart-after=panel NoDisplay=true X-Ubuntu-Gettext-Domain=xdg-user-dirs-gtk $(\Bbb Z\oplus \Bbb Z)[X] \not\cong \Bbb Z[X]\oplus \Bbb Z[X]\,$? Well i tried to prove it but failed. They are both commutative and have the same set of units. So i can't see a property of one ring which the other ring does not possess. Thank you for any help. regular expressions / pattern matching on ubuntu command line Can we exempt downvoted accepted answers from getting the top spot? The PHB is a bit unclear when it comes to readied spells in combat. If I lose my concentration do I lose the spell slot? What about if the trigger never occurs, do I get the spell slot back? When clicking &quot;edit&quot; I see:  Your edit will be placed in a queue until it is peer reviewed. We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.  Like:     Likewise, when I am not logged in, clicking &quot;improve this question&quot; or &quot;improve this answer&quot; shows:  You are not . Your edit will be placed in a queue until it is .  And when I click 'Save', I get:  Thanks for submitting an edit. It is only visible to you until it's been approved by trusted community members  Like:     Who can suggest an edit? Where do suggested edits go? Who can vote on a suggested edit? How do suggested edits get reviewed? Can I earn reputation? What about abuse or bad edits? Sometimes the Community user approves or rejects my edit. Why is that? When can I not suggest an edit? Is there a minimum change requirement for a suggested edit? How do I check my suggested edit history? I disagree with the reasons why my suggested edit was rejected. What can I do? How do I know whether there are edits waiting for review? Someone suggested an edit to my own post, and the reviewers took the wrong action. What can I do? Are tag wikis included in this scheme? What do the &quot;Improve Edit&quot; and &quot;Reject and Edit&quot; buttons do? Why are apparently valid links to rejected edits resulting in 404 errors?   For more information about editing, see &quot;&quot; in the . Can a black hole absorb photons whose wavelengths are greater than the BH horizon size? Application launchers in '/usr/share/applications' not working in Nautilus Remove HTML Tags from an NSString on the iPhone There are a couple of different ways to remove HTML tags from an NSString in Cocoa.   is to render the string into an NSAttributedString and then grab the rendered text.   is to use NSXMLDocument's -objectByApplyingXSLTString method to apply an XSLT transform that does it.  Unfortunately, the iPhone doesn't support NSAttributedString or NSXMLDocument. There are too many edge cases and malformed HTML documents for me to feel comfortable using regex or NSScanner. Does anyone have a solution to this?  One suggestion has been to simply look for opening and closing tag characters, this method won't work except for very trivial cases.   For example these cases (from the Perl Cookbook chapter on the same subject) would break this method:  &lt;IMG SRC = "foo.gif" ALT = "A &gt; B"&gt;  &lt;!-- &lt;A comment&gt; --&gt;  &lt;script&gt;if (a&lt;b &amp;&amp; a&gt;c)&lt;/script&gt;  &lt;![INCLUDE CDATA [ &gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; ]]&gt; Check for column name in a SqlDataReader object How do I delete unique rows from a table with duplicate keys? I have the following data:        road        |  ID  | other column  | other column |  ------------------+------+---------------+--------------+           MAIN ST           |  1   |     ...       |     ...      | MAIN ST           |  2   |     ...       |     ...      |         MAIN ST           |  3   |     ...       |     ...      | BERRY LN          |  4   |     ...       |     ...      | BERRY LN          |  5   |     ...       |     ...      | BERRY LN          |  6   |     ...       |     ...      | JOHN RD           |  7   |     ...       |     ...      | JOHN RD           |  8   |     ...       |     ...      |   I want all rows with duplicates in the road column removed. It does not matter to me which duplicates are removed. The end result can look something like this:        road        |  ID  | other column  | other column |  ------------------+------+---------------+--------------+           MAIN ST           |  3   |     ...       |     ...      | BERRY LN          |  4   |     ...       |     ...      | JOHN RD           |  8   |     ...       |     ...      |   where the id's are any value, as long as the road column is unique.   Is there a simple way to do this in SQL or T/SQL? I followed the guide , but it only applies to duplicate keys with non-unique rows. How to read a file line-by-line into a list? Are global variables thread-safe in Flask? How do I share data between requests? How many ways can the average of n dice be a? How does Windows know whether it has internet access or if a Wi-Fi connection requires in-browser authentication? Installing Kali on a USB drive - NOT Live USB or Persistence partition Greeting's, to clarify; my question is not creating a Live USB drive or a persistence partition but creating a USB with GRUB bootloader (or other) and Kali which can be used on any machine. This is similar to running other linux OS directly from USB. I am currently running Ubuntu from a pen drive. I installed the OS (Ubuntu) and the bootloader on the pen drive and I can boot off it anywhere. Here is a video explaining the same (video is not by me: )  Since, Kali's installer doesn't give option to select which drive to write the booloader to and directly writes on the HDD (sda1). This means even if I partition and install Kali on a pen drive since the bootloader will be installed on the machines fixed primary drive, the USB drive will fail to boot on a different device.  I have two questions:   Anyone has any idea how to write bootloader to a USB drive and what parameters should be given so that it boots with Kali installed on it. I am using graphic install mode for installing Kali on the USB drive, however there is no option for the install to be encrypted (Full disk encryption or at least /home folder to be encrypted). Does anyone know how can I install Kali with full disk / home folder encryption? Or enable is post install?   Thank You! How to use multiple Effect Strips in Blender Video Sequence Editor? Is there a way to absolutely force a Log Out, Shut Down, or Restart with open tabs and unsaved documents? I could not find any relatively simple way to log out of a public use Mac quickly with many tabs open and unsaved document in the background without resorting to sudo shutdown -h now.  The reason I ask is that sometimes a user will have his/her account logged into the iMacs here at school and they would try to log off and then leave, thinking it has completed but the process is interrupted by Safari and Office apps, leaving their account, mounts, and websites still accessible to the next person who sits down.  Obviously a shortcut string would be nice instead of posting a note telling the person to type arcane things in a terminal. For example, just having them try to find Terminal.app is going to be a chore.  This doesn't seem to make sense because the user can just quit each app and click a few dialog boxes but unlike you and I to whom repeatedly pounding Command-Q while hitting the spacebar and D keys are probably second nature. How do I extract a single chunk of bytes from within a file?