views:

548

answers:

3

Hello!

I'm trying to move some Excel-Data to MySQL, but having troubles with encoding.

What I did:

  1. Data export from OpenOffice 3.1 as csv (utf-8 encoded)
  2. Import to phpMyAdmin via file upload (Table encoding: '*utf8_unicode_ci*')

In phpMyAdmin's view mode, the data is displayed correctly (it is using utf-8 as charset):

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

When I try to display the Data on my webpage, I get a hash with a question mark in it.

System-Info

  • The language I try to get on my page: German
  • MySQL client version: 5.0.32
  • My OS: MAC OS X 10.5.7
  • Server-Script: CakePHP v1.2.3.8166

Regards, Benedikt

A: 

Are you setting the connection to UTF-8 with mysql?

SET NAMES 'UTF-8'
BYK
A: 

I solved the problem. It was a mistake of mine.

Benedikt R.
He don't answer the question.
+1  A: 

I had a similar symptom, my solution was to add

'encoding' => 'UTF8' 

to config/database.php

sibidiba