Announcement

Collapse
No announcement yet.

Importing an external MySQL table and special characters

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Importing an external MySQL table and special characters

    Having trouble with special characters and the "coding" after the import. They aren't displaying correctly. The typical symbol is the Tradeamark.

    The tables are exported via PhpMyAdmin from a different Cart system. The TM exists in the table, a name field for example, as expected. I wrote a component module to read the table and create structures/arrays in Miva variables to be able to display the data where it's needed. The result mvt or mvte is the question mark. But, even encoding or decoding when doing a lookup and populating the structure isn't making a difference. Not sure what I need to do. It's a one-time operation when the live data is moved over so i don't care if it's when exporting or importing. Ideas?

    Thanks,

    Scott
    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!

    #2
    The ability to store a particular character without translation will depend on quite a few things, including the character set of each step along the way, the target web server, and potentially both the underlying database management system and the table in question. For example, the trademark symbol is not part of UTF8, it is from the extended latin1 supplement, so if you're taking this data in a text file and each step along the way is not compatible with the data preserving its latin1 character set (including the receiving http request, filesystem on the computer it is saved to, etc.), and the target store is not using latin1 or equivalent greater-than-UTF8 character set for its own http requests, or the underlying database, then you're going to end up with something else being stored that turns into a different character when it comes back out.

    I'd recommend, if the file looks correct on your computer, using a tool on your computer to find and replace extended characters into their html equivalents; anything short of that will likely behave unpredictably long term, where perhaps it gets corrected for the time being, but ends up altered later on when someone edits the product in question with a browser using a different character set, different language, etc. You could use something like Notepad++, vi, command line tools, etc. to find characters from beyond the normal UTF8 range and then find/replace with the properly mapped html code, until you have none left.
    David Hubbard
    CIO
    Miva
    [email protected]
    http://www.miva.com

    Comment


      #3
      Thanks. Gives me an idea how to attack this problem.

      Scott
      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment

      Working...
      X