Some of my contents which are coming directly from MySQL database are displayed like  â€™ , â€” characters.    I guess while inserting the data into the database, I mistakenly used SET NAMES utf-8 instead of SET NAMES utf8. For which the special characters are not converted properly and showing as it is.    In order to avoid these I used the follwoing in the page between &lt;head&gt; tag .. &lt;meta http-equiv="Content-Type" content="text/html";charset=UTF-8" /&gt; .    But it didn't work.    How to convert these into its original characters while showing in the page ?
326
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.
14520
For example, mysql quote table name using   SELECT * FROM `table_name`;   notice the `   Does other database ever use different char to quote their table name
85743
I am working on a project that uses a CSV file supplied by the client to populate a database. The client is to create the spreadsheet, then save it as a CSV to be uploaded, which is then parsed into a database.  The problem is, whenever the client saves the excel spreadsheet as an MS-DOS .csv file, many of the special characters get converted to question marks "?" (symbols such as ' " / ). However, if we then open the CSV file and manually replace each ? with the right character it works fine.  The problem is that the data file is HUGE, and we can't reasonably do this, so I was hoping there was a way to save it. We have tried exporting as Unicode and ASCII to no avail. We have also tried uploading to google docs, and re-saving, however, it also breaks those characters.
113299
I'm trying to learn a bit more about the details of proper database construction and ran across something that confuses me. In a current Wordpress installation, I'm finding varchar fields used for indexes which are longer than the 191 characters, which the documentation seems to say is the max. I'm running MariaDB 10.x which I believe matches up with MySQL 5.7, and the  confirms the limit when using utf8mb4_unicode_ci collation and compact as the format.  I'm finding varchar(200) and varchar(255) indexed fields, e.g. wp_postmeta, the field meta_key is varchar(255). Am I wrong or confused on this? The db is using the InnoDB engine. Thanks for any clarification.
30654
I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings?
75495
Apparently a lot of people complain that they only see random letters and characters:    My biggest problem is that I can't reproduce the problem on ANY of my devices! Not on my Windows XP laptop, not on my Windows 7 laptop, not on my Android phone or my iPod Touch. It doesn't matter which browser I'm using. The only time I see the problem myself is when I try to share one of my blog posts on Google+, because the blog description then appears in strange characters.  So, first of all I need to find a way to reproduce the problem somehow. Otherwise I won't be able to see if what I did fixed the problem or not.  I did everything that @toscho recommended, but nothing helped.  Did anybody ever run into a similar problem or would you know where I could start to look for the problem?  Edit: I contacted my webhost. They couldn't reproduce the problem, just like me. They said that they have enabled gzip compression on their servers. They suggested turning off one plugin after another to see what happens, but as I can't reproduce the problem, I can't do that. Please help!  More and more readers are complaining about this problem. Most of them just need to refresh the page or wait a few minutes and then the site loads normally, but I'm still using a lot of traffic because of that.  EDIT 2: The W3 Total Cache Plugin FAQ says: I see garbage characters instead of the normal web site, what's going on here?  If a theme or it's files use the call php_flush() or function flush() that will interfere with the plugins normal operation; making the plugin send cached files before essential operations have finished. The flush() call is no longer necessary and should be removed.  I am pretty sure that none of my code has this call anywhere, but I'm not 100% sure. Is there any way to find out other than searching through millions of characters in all of my files?
13695
If I try to put something like this into a question or answer  &lt;!-- &lt;br&gt;s are important here --&gt;   the first &gt; after the "br" is matched to the first &lt; before the "!--", resulting in this being displayed:     s are important here -->   This happens in both previews and actual posts. I'd say it's a bug.  HTML comments shouldn't be treated as regular HTML tags; &lt;!-- should only be matched to --&gt;.
29504
What is the best way to replace all '&amp;lt' with &amp;lt; in a given database column? Basically perform s/&amp;lt[^;]/&amp;lt;/gi  Notes:   must work in  2000 Must be repeatable (and not end up with &amp;lt;;;;;;;;;;)
47610
This has been confusing me for some time. With the advent of UTF-8 as the de-facto standard in web development I'm not sure in which situations I'm supposed to use the HTML entities and for which ones should I just use the UTF-8 character. For example,   em dash (–, &amp;emdash;) ampersand (&amp;, &amp;amp;) 3/4 fraction (¾, &amp;frac34;)   Please do shed light on this issue. It will be appreciated.
89886
According to the , in order to make code more portable, they recommend using something like the following for escaping data:  if (!get_magic_quotes_gpc()) {     $lastname = addslashes($_POST['lastname']); } else {     $lastname = $_POST['lastname']; }   I have other validation checks that I will be performing, but how secure is the above strictly in terms of escaping data? I also saw that magic quotes will be deprecated in PHP 6. How will that affect the above code? I would prefer not to have to rely on a database-specific escaping function like mysql_real_escape_string().
6999
For some strange reason, my computer suddenly doesn't show certain unicode characters anymore! I have no idea what happened.  Affected applications include Windows Explorer (should be Japanese characters), Google Chrome (should be a heart), and Winamp (should be stars):      Russian, German etc. characters are displayed normally. Chrome also displays Japanese script on websites, but not in the GUI. How can I fix it?     TL;DR: A workaround is to put a shortcut with a Unicode name on the desktop so that explorer.exe is the first process to display a Unicode string after booting.     Update: I have tried to use System Restore to fix it. I needed to go back in time quite a while because the most recent restore points didn't solve it so I used one from the middle of November. After that restore, Unicode symbols were displayed again. Then I updated my system with Windows Update again because those were removed during the restore. After that, the error occurred again! I then did a restore to a point before my new updates, but the error persists, and the old restore point (which I used before) is gone and there are currently no other snapshots of the system. Any suggestions on what to do now?  Update 2: I could find a workaround:      Control Panel → Region and Language → Administration → Change Language for Unicode-incompatible programs to Japanese (Japan).    All mentioned programs display their symbols correctly again. However, I don't consider this a fix because these programs are not usually Unicode-incompatible, and it also leads to some (non-serious) artifacts in some programs. I still welcome an answer that tells me what went wrong here and how to fix the issue.  Update 3: I think I have isolated the particular Windows Update which causes the error. It is . I have installed all other updates except this one, and the error did not occur again.  Update 4: The true origin of this problem was Chrome, see accepted answer. Workaround: put shortcut with Unicode name on desktop so that explorer.exe is the first process to display a Unicode string after booting.
69818
I am using TeXworks to write documents, but as I am doing some stuff in spanish, accents are required. When I write  áéíóú   I get  Ã¡Ã c   If I do \'a \'e \'i \'o \'u  I get the desired result áéíóú  I have changed in Edit->preferences->Editor->Coding->ISO-8859-1  instead of UTF-8 but get the same results.
18694
We have a simple T-SQL script file (.sql), which we execute through Powershell. Everything works fine, except the script portion, where we are using some special characters as string (example: 'ô' ).   The same script works fine, if I just execute it through SQL Server Management Studio, but through Powershell it's not rendering these special characters properly.  Here how we access the script file to execute on all databases on instance  Add-PSSnapin SqlServerCmdletSnapin100 Add-PSSnapin SqlServerProviderSnapin100 invoke-Sqlcmd -InputFile "C:\DailyPatch\run.sql" | Out-File -filePath "C:\DailyPatch\dbname.txt"  $text=Get-Content C:\DailyPatch\dbname.txt $a = $text.length $a=$a-3  $logFile = 'C:\DailyPatch\dblog.txt'  for ($i=3 ; $i -le $a ;$i++) {        write-host $text[$i]     $error.clear()      Invoke-sqlcmd -inputfile "C:\DailyPatch\Script4AllDBs.sql"-database $text[$i]-OutputSqlErrors $true|Out-File -filePath "C:\DailyPatch\dbname.txt"      foreach ($rr in $error) {         $text[$i] &gt;&gt; $logFile         $rr &gt;&gt; $logFile     } }   How to set collation in Powershell to avoid such kind of issues?  ps. Unicode thing is already handled on script side  Added: Special characters are being changed to � (Replacement Character)
93580
I'm working with a MySQL database that has some data imported from . The data contains non- characters (em dashes, etc.) as well as hidden carriage returns or line feeds. Is there a way to find these records using MySQL?
60593
I'm trying to write a query which replaces the special characters with space. Below code helps to identify the rows. (alpha-numeric characters, comma and space is valid):  SELECT columnA FROM tableA WHERE columnA like '%[^a-Z0-9, ]%'   How can I integrate the replace function into the select statement so that all characters other than alphanumeric, comma and space in the result set are  replaced by ' ' (space). This one won't work:  SELECT replace(columnA,'%[^a-Z0-9, ]%',' ') FROM tableA WHERE columnA like '%[^a-Z0-9, ]%'
43149
I did a search for A$, but a whole bunch of results containing "Å", "A's" and "as" were return, could not find one containing "A$":    Same thing for other special characters such as "#".
123297
I have the following code  &lt;?php if ($handle = opendir('C:/xampp/htdocs/movies')) {     while (false !== ($file = readdir($handle))) {         if ($file != "." &amp;&amp; $file != "..") {             echo $file."&lt;br /&gt;\n";         }     }     closedir($handle); } ?&gt;   When it does have mb language such as japanese, it doesn't display properly instead it display like kyuukyoku Choujin R ?????~? rather then kyuukyoku Choujin R 究極超人あ～る  Anyway to make it display the correct name or make it still download-able by others?  Thanks for helping me :)