[TYPO3-mvc] findBy[Property] ignores 'ö, ü, ä, etc'
Stanislaw Gutsch
stasmymaillists at gmail.com
Thu Apr 25 09:35:29 CEST 2013
Hello Adrien,
after debugging for a bit I have to agree that your right. I do get symbols
like "*ã¼*" for "ü" as a result out of my database and then try to search
the database with those altered symbols again.
Which obviously leads to findBy not finding "umlauts" properly for me.
I do not know where the "conversion" happens though.
My controller does following:
$allEntires = $this->repository->findAll()->toArray();
then fills a array with:
foreach($allEntries as $entrie) {
array[$i] = $entrie->getName();
}
The getName() method looks like this:
/**
* Returns the name
*
* @return string $name
*/
public function getName() {
return $this->name;
}
at the end I use $repository->findByName(array);
Could my getName() method do some conversions? In the database itself
"umlauts" are stored properly though.
2013/4/25 Adrien Crivelli <adrien.crivelli at gmail.com>
> This is a very wild guess, but could it be collation related ? If you are
> not familiar with that, maybe have a look at:
> https://dev.mysql.com/doc/refman/5.5/en/charset-general.html
>
>
> On 25 April 2013 01:39, Stanislaw Gutsch <stasmymaillists at gmail.com>
> wrote:
>
> > Hello everyone,
> >
> > first off all I´d like to mention that I'am rather new to Extbase and
> Typo
> > 3. While I'am getting used to it day by day I still sometimes run into
> > problems where I just can't think off an solution. One of these problems
> is
> > that I have "umlauts" in an $repository->findBy[property]($operand) and
> the
> > findBy simply ignores entries with "umlauts".
> >
> > The "umlauts" are stored in a array like this:
> > $names = array ( 0 => München
> > 1 => Lübek
> > 2 => Bonn
> > 3 => ......
> > );
> >
> > The repository method call looks like this:
> > $repository->findByName($names);
> >
> > Thx in advance!
> > _______________________________________________
> > TYPO3-project-typo3v4mvc mailing list
> > TYPO3-project-typo3v4mvc at lists.typo3.org
> > http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> >
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
More information about the TYPO3-project-typo3v4mvc
mailing list