'SQL Table, Importing CSV files turns apostrophe into question mark
I have a CSV files with copy that contains apostrophes and when I import it into the database using MAMP, it turns all the apostrophes into question marks. Is there a fix for this?
Thank you in advance!
Solution 1:[1]
This is the result of saving your files in non UTF-8 format such as ANSI. When you open a file with text editors that don't support UTF-8 and save it again, this will happen.
Download a text editor such as Notepad++ and check and convert all your (plugin or theme) files to UTF-8 or UTF-8 Without BOM
http://wordpress.org/support/topic/how-fix-black-diamond-question-marks-in-wp-321
Solution 2:[2]
I had the same problem even when saving my CSV file as UTF-8. So in Microsoft Word, I edited the text and replaced the actual apostrophes and quotation marks with HTML code (' and ") and then copy and pasted it into my CSV file. This seemed to work for me. I used this website for the html code: http://www.ascii.cl/htmlcodes.htm
Solution 3:[3]
For special characters that aren't importing properly you could try TSQL Bulk Insert and include either:
CODEPAGE = 'ACP' --For ANSI files
CODEPAGE = '65001' --For UTF-8 files
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mari |
| Solution 2 | Adrienne |
| Solution 3 | PM 77-1 |
