Welcome Guest, Not a member yet? Register   Sign In
Importing data from sfYaml with regional chars gets weird
#1

[eluser]rockstyle[/eluser]
Here's my fixture
Code:
User:
  Admin:
    username: Administrator
    password: testing
    email: [email protected]
  Test:
    username: TestUser
    password: mypass
    email: [email protected]
  Foo:
    username: Foobar
    password: mypass
    email: [email protected]

Bank:
  Bank_1:
    title: titleasd
    description: >
      lolz desc
    url: http://asdasde234.pl
    forum_url: http://435345234.info/viewtopic.php?v=23123
    logo_url: http://images.imageshack.us/34234.png
  Bank_2:
    title: Otwartapestka.pl
    description: >
      Zasiejemy całą Polskę
    User: Foo
    url: http://otwartapestka.pl
    forum_url: http://otwartapeskta.info/viewtopic.php?v=23123
    logo_url: http://images.otwartapeskta.info/otwartapestka.png
  Bank_3:
    title: growspot.pl
    description: >
      Shit in your pants. :D
    url: http://growspot.pl
    forum_url: http://growspot.info/viewtopic.php?v=23123
    logo_url: http://images.otwazxcrtapeskta.info/otwartapestka.png
    created_at: '2009-11-20 02:15:33'
    updated_at: '2009-11-20 02:15:33'
  Bank_4:
    title: shitpants.pl
    description: >
      SasdasdasdD
    url: http://growasdasdasdpot.pl
    forum_url: http://growspoasdasdt.info/viewtopic.php?v=23123
    logo_url: http://images.otwazxcrtapasdeskta.infoasdasd/otwartapestka.png
    created_at: '2009-11-20 02:16:33'
    updated_at: '2009-11-20 02:15:33'

Category:
  Waiting:
    title: Oczekujące
    Banks: [Bank_1]
  Accepted:
    title: Zaakceptowane
    Banks: [Bank_2]
  Dismissed:
    title: Odrzucone
    Banks: [Bank_3, Bank_4]

And error:
Quote:A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: views/accepted.php

Line Number: 3

I have database with utf8_polish_ci and utf-8 set as option for doctrine, why when i'm importing this file with utf-8 encoding chars look different like this:
"OczekujÄ…ce" etc, with ansi file it gets similiar. How can i fix this?
#2

[eluser]Sbioko[/eluser]
Convert your php files to UTF8 without BOM and before running the queries, run following query:
Code:
SET NAMES 'utf-8'




Theme © iAndrew 2016 - Forum software by © MyBB