0

Hello I stuck with this character encoding problem, please help.

What I did:

  • I created a database with UTF-8 Encoding.
  • I created a database connection with charset, names etc set to UTF-8.
  • I try to set paypal button encoding both UTF-8 and ISO-8859-9.
  • Added header('Content-Type: charset=utf-8'); to my postback php file.
  • Added setlocale(LC_ALL, "tr_TR"); to my postback php file.
  • I set hidden charset input to paypal button code. Also set "lc" tr_TR.
  • Tried to change encoding with "iconv" both latin5 to utf-8 and iso-8859-9 to utf-8
  • Double checked if the files i am working on are UTF-8 Without BOM

But no luck...

After I sent the form, on paypal page, it shows "options" correctly but the values are not inserting to my database as shown instead there are only question marks.

Please help, thanks.

Edit: I'm trying to get Turkish characters correctly: üğİışŞöÖçÇÜĞ

Ali Demirci
  • 5,302
  • 7
  • 39
  • 66

1 Answers1

0

I would advise encoding the shipping address and names using this before storing it in your database:

mb_convert_encoding("üğİışŞöÖçÇÜĞ", 'HTML-ENTITIES', 'UTF-8')

David Nguyen
  • 8,368
  • 2
  • 33
  • 49