+ Reply to Thread
Results 1 to 1 of 1

Problems uploading CSV to mySQL database

  1. #1
    Registered User
    Join Date
    05-17-2013
    Location
    Canada
    MS-Off Ver
    Excel Mac 2011
    Posts
    1

    Problems uploading CSV to mySQL database

    Hi All,

    I don't fully understand encoding but believe it has to do with the problem I am having.

    I need to regularly upload data via CSV to a mySQL database.

    The data sometimes contains characters like ' or " or . These characters look fine in xls format and in csv format. Just to be clear an apostrophe ' works fine but not single quotes.

    The data are not uploading to the database correctly.

    In another thread I found this:

    SOLUTION:
    The only "easy way" of doing this is as follows. First, realize that there is a difference between what is displayed and what is kept hidden in the Excel .csv file.

    (1) Open an Excel file where you have the info (.xls, .xlsx)
    (2) In Excel, choose "CSV (Comma Delimited) (*.csv) as the file type and save as that type.
    (3) In NOTEPAD (found under "Programs" and then Accessories in Start menu), open the saved .csv file in Notepad
    (4) Then choose -> Save As..and at the bottom of the "save as" box, there is a select box labelled as "Encoding". Select UTF-8(do NOT use ANSI or you lose all accents etc). After selecting UTF-8, then save the file to a slightly different file name from the original.

    This file is in UTF-8 and retains all characters and accents and can be imported, for example, into MySQL and other database programs.
    But these steps did not work for me. Another fix I tried was to move the data to a Google Drive worksheet, download as csv, then import to mySQL. Didn't work.

    For example, I uploaded this line:

    Take a photo of the "Mario"

    But it looks like this in the database:

    Take a photo of the €œMario.€ ....Actually is it just a with the accent, there is no Euro symbol or oe symbol


    Can anyone suggest a fix for this?

    Is the problem with the encoding of the database itself? How do I look this up (please keep in mind I know very little about mySQL).

    Thanks in advance!

    Andrew
    Last edited by andrew_long15; 05-17-2013 at 06:48 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1