Importing International Chars into MySQL using phpmyadmin

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Importing International Chars into MySQL using phpmyadmin

Postby TDinDC » 19. September 2009 20:19

I have a comma-delimited ascii file that I've imported into MySQL using XAMPP's phpmyadmin IDE that contains a number of Spanish characters. All these characters are within the 8-bit ascii set. Several of them, namely unicodes U0161: "¡", U0191: "¿", and U0241: "ñ", import as '?' All other Spanish language characters, namely the vowels with acute accents, like "á" and umlauted character "ü", import fine.

I've tried various 'character set of the import file' and per-table 'collation' options, including UTF-8, collated with utf8_spanish1_ci and utf8_spanish2_ci. I've also tried ISO-8859-1 in conjunction with collations latin1_general_ci, latin1_general_cs, and latin1_spanish_ci.

I've set intl.default_locale = "es" in php.ini There is no lang.tmp file anywhere on my computer.

Also, since the file is a comma-delimited file, I checked to see if there was any field parsing error, and could find none in sampling the 5000+ records in the file.

I understand that PHP 5 can have problems with UTF-8 (see http://www.phpwact.org/php/i18n/utf-8), but these are related to PCRE so I don't see how the import functions in myphpadmin could have anything to do with the problem in light of the fact that I didn't find any field parsing errors: surely breaking substrings at inappropriate places with regular expressions would result in nonsense in some fields.

TDinDC
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24

Re: Importing International Chars into MySQL using phpmyadmin

Postby TDinDC » 19. September 2009 23:54

After some further testing and a careful analysis of the data, its collation type, and the character set used in the import: I find that the character set used in the import is more important here than the collation - at least fore the collation cases I've tested, which are latin1_general_ci or _cs , or utf8_spanish_ci. Any of these work if the import character set is ISO 8859-1, but they don't work if it is set to UTF8.

In either case, though, there is still a problem with the three characters I cited in my initial post.

Hope that helps.
TDinDC
 
Posts: 13
Joined: 24. August 2009 11:24


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 53 guests

cron