UPDATING: My version of Mysql is now 5.7.23 , i have followed all the instructions of the link above. The charset of all the database, all the tables and the columns is now utf8mb4.  Before every query there is:  mysqli_set_charset($link, 'utf8mb4');  Despite this, i have still problem displaying in the browser the Spanish chars.  My Question:  I know that this is a very common question on Stackoverflow, but i have already looked for a solution and i have implemented all the strategies to solve this problem without success.  I am developing a Spanish Website, on localhost everything is working fine but when i upload the website, i cant see the Spanish characters like ñ for example. I see instead of them the following question mark: �  I precise that:   After &lt;head&gt; there is &lt;meta charset="UTF-8"&gt; In all the PHP files, in the first line of code there is: header('Content-Type: text/html; charset=utf-8')before any further header is sent. Before every Mysql query there is mysqli_set_charset( $conn,'UTF8') All the database, the tables and also columns are set to utf8 In php.ini there is default_charset = "utf-8"  UPDATING:   The problem seems related to the database, if i put the following file online i can see the charñ without problems, but if the same city come from the database i see �.  &lt;html&gt;  &lt;head&gt;   &lt;meta charset="UTF-8"&gt; &lt;/head&gt;   &lt;body&gt;    A Coruña  &lt;/body&gt; &lt;/html&gt;   More info about my database:  mysql&gt; SELECT default_character_set_name FROM information_schema.SCHEMATA -&gt; WHERE schema_name = "mydb";  +----------------------------+ | default_character_set_name | +----------------------------+ | utf8                       | +----------------------------+   And as i have written, all the tables and also columns are set to utf8. I am querying the DB with the following code:  $chandle = @mysqli_connect($dbhost, $dbuser, $dbpass,$dbname) or die("Connection Failure to Database");  mysqli_set_charset( $chandle,'UTF8');  $result=@mysqli_query($chandle,$q) ;    Anyway, executing Curl on the page that gives the encoding problems, these are the headers:  HTTP/1.1 200 OK Server: nginx Date: Wed, 29 Aug 2018 08:12:31 GMT Content-Type: text/html Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: PHP/5.3.3 Expires: Thu, 19 Nov 1981 08:52:00 GMT Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 Pragma: no-cache X-Powered-By: PleskLin X-Robots-Tag: noindex,nofollow
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.
Why are C# interface methods not declared abstract or virtual? Are Newton's "laws" of motion laws or definitions of force and mass? If you consider  as laws, then there must be independent definitions of  and  but I don't think there's such definitions.  If you consider them as definitions, then why are they still called laws? Selecting one every n frames from a video using ffmpeg How does a cell phone charger work? I have studied that there is a transformer which steps down the ac voltage after then bridge rectifier to convert into ac to dc and then given to filter, this is what I have learnt in books, but when I open a mobile charger I couldn't figure it out how it actually works? Diacritics and non-English letters in anglicized loan words: keep 'em, dump 'em, italicize the words, or what? Difference between UART and RS-232? Most of the time  and UART come together in serial communication theories. Are they both the same? From my readings I concluded UART is a hardware form of the RS-232 protocol. Am I correct? Prove recursively defined sequence converges I would like some advice on how to solve problems like the following: Let $(x_n)$ be a sequence defined by $x_1= 3$ and $x_{n+1} = \frac{1}{4-x_n}$. Prove that the sequence converges.  My strategy is to use the Monotone Convergence Theorem, but I am having trouble showing that the sequence is decreasing and bounded below. Here's my work so far:  Decreasing: The first 4 values are $3,1,1/3,3/11$, so let's assume $x_n \leq x_{n-1} \leq \ldots \leq x_1$. Want to show $x_{n+1} \leq x_n$. We have $x_{n+1} = \frac{1}{4-x_n}$. I want to have an upper bound for the RHS, but can't find one and don't really know where to go from here.  Bounded below: I wanted to show that all values are positive, but if we assume $x_n &gt; 0$, that doesn't rule out $x_{n+1}$ from being negative. xargs and vi - "Input is not from a terminal" Why would Littlefinger want this person dead? Matching a space in regex I need to match a space character in a PHP regular expression. Anyone got any ideas?  I mean like "gavin schulz", the space in between the two words. I am using a regular expression to make sure that I only allow letters, number and a space. But I'm not sure how to find the space. This is what I have right now:  $newtag = preg_replace("/[^a-zA-Z0-9s|]/", "", $tag); How to calculate the correct focal length needed for a subject of a given size and distance? I need to purchase my first ever lens. So far I've only used lenses that were built into a camera. This specific lens is for the BlackMagic Deign Pocket Cinema Camera (a video only camera, but one that uses photography lenses). I would prefer this to be a prime lens.  I have tried to find the exact way to calculate the focal length of the lens I need but I have not been able to find a good resource to make this simple enough for my limited optics knowledge. Can you please explain a simple way to calculate the focal length of a lens given the following inputs as an example:    I would prefer a simplified mathematical explanation so that I may use it to make similar determinations in the future using a "" method.  I have . Using that method, I came up with:  Required lens focal length = 7.02mm sensor height x (77in / 36in) = 15mm   Is that correct? What is the correct way to install proprietary ATI Catalyst Video Drivers (fglrx) directly from AMD? I am planning on doing a fresh install of Ubuntu and want to know what is the correct way to install ATI Catalyst Video Driver?      There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below: Custom cross-reference formats (e.g. "Equation 1" instead of just "1") What is the easiest/best/most correct way to iterate through the characters of a string in Java? StringTokenizer? Convert the String to a char[] and iterate over that? Something else? How to switch language keyboard combination? Humanity meeting another similar intelligent life form deep into space (or not)? I'm looking for a plot line (it should be a short story) that depicts Earth population (or their close descendants) establishing contact with another intelligent life form deep into space.   After careful studying of DNA samples and language / communication symbols they then realize that the civilization in question is also from Earth but that they departed very long ago and travelled throughout the galaxy in the completely opposite direction so that they are now meeting practically at the point of the circle opposite to Earth. There might have been some anatomical differences as well.  As far as I can remember, the story concludes shortly after that.  This should be a work of a well-known SF author, so I'm hoping for a quick response (if time didn't corrupt my memory too much).  I don't think it was part of an anthology, but it's entirely possible it was in a magazine.  As for the timeline, I've read it about 2-3 years ago, but since I have a passion for older SF works it might not be of much use.  Edit: Not sure if this could help but for what it's worth, it might be contained in . How do I fix this "E: Type '*' is not known on line * in source list ..." update error? Why is setTimeout(fn, 0) sometimes useful? Is "It is you who are mistaken!" correct? Possible Duplicate:          This is a line spoken by the . I always wondered if this is grammatically correct.  Luke says something like "You are mistaken ..." which the Emperor answers with     No, it is you who are mistaken!   Why wouldn't he say     No, it is you who is mistaken!   instead?  I don't know what rules apply here but my stomach tells me the latter is (at least also) correct, although you would say "you are mistaken". It feels as if he should be referring to "you" in the third person.  Could you please shed some light? Are both correct or – if not – which one is correct? And why? NOTE: I would appreciate it if you provided a hint and not the whole solution.  BdMO 2014 Nationals:     In acute angled triangle ABC, considering a portion of side BC as diameter a    circle is drawn whose radius is 18 units and it touches AB and AC side. Similarly,    considering a portion of sides AC and AB as diameters, two other circles are    drawn whose radii are 6 and 9 units respectively. What is the radius of the incircle    of ∆ABC?   The main problem with this  problem is that the figure is incredibly messy.So I drew one circle,and tried getting information from it.I noticed that if $O$ is a centre of one of the above (semi)circles,and if $O$ is located on $AB$, then $CO$ is an angle bisector.Therefore,if we connect all the vertices with the centres,their intersection would be the incentre.Then we need to drop a perpendicular from this point to get the inradius.But that hardly helps us.I have found some similar triangles in the figure.But that does not help me at all.  I have also tried backtracking.I tried to put myself in the problem-maker's shoes and tried to imagine what I would do if I had to create a problem like this.Unfortunately,I couldn't do it..  Any insightful comment,hint will be very much  appreciated.