circumflex characters

294 views
Skip to first unread message

Martien

unread,
Mar 5, 2011, 6:24:29 AM3/5/11
to redbeanphp
Hi. I've been using the  ´ etc. and I noticed that redbean breaks on
these characters. I am using utf8_unicode_ci as charset.
Everything goes well until I call $item->store() then all the text
from the special character on is removed.
Is there a wat can solve this?

Best regards,
Martien

gabor

unread,
Mar 5, 2011, 1:27:53 PM3/5/11
to redbeanphp
Hi,

Can you send me some example code?

Over here this

require "rb.php";
R::setup();
$bean = R::dispense("bean");
$bean->prop = "Â";
print_r( R::load("bean", R::store($bean) ) );


just outputs the bean including the character. What DB and HTML-
charset do you use?
Did you check this on command line?

Cheers
Gabor

Martien de Jong

unread,
Mar 6, 2011, 10:38:16 AM3/6/11
to redbe...@googlegroups.com
Hi,

This is my code:

$item->LastUpdated = date("F j, Y, g:i a");
$item->Name = $Key;
$item->LanguageID = $LanguageID;
$item->Title = $Title;
$item->Text = $Text;
$id = R::store($item);

The variables are filled from the post data. The text field contains multilingual text. When I do a var_dump before the store command, it shows the whole line of text, but after the store command, it is broken at certain characters, like the ´ character.
I use utf8_unicode_ci in the database and iso-8859-1 in the html.

--
Best regards,

Martien de Jong - martiendejong.nl


2011/3/5 gabor <gabord...@gmail.com>
--
You received this message because you are subscribed to the Google Groups "redbeanphp" group.
To post to this group, send email to redbe...@googlegroups.com.
To unsubscribe from this group, send email to redbeanorm+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redbeanorm?hl=en.


gabor

unread,
Mar 6, 2011, 12:41:35 PM3/6/11
to redbeanphp
Have you tried to use utf8 instead of iso-8859-1 (latin-1)? might be
an HTML issue ?

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

On Mar 6, 4:38 pm, Martien de Jong <martiendejong2...@gmail.com>
wrote:
> Hi,
>
> This is my code:
>
> $item->LastUpdated = date("F j, Y, g:i a");
> $item->Name = $Key;
> $item->LanguageID = $LanguageID;
> $item->Title = $Title;
> $item->Text = $Text;
> $id = R::store($item);
>
> The variables are filled from the post data. The text field contains
> multilingual text. When I do a var_dump before the store command, it shows
> the whole line of text, but after the store command, it is broken at certain
> characters, like the ´ character.
> I use utf8_unicode_ci in the database and iso-8859-1 in the html.
>
> --
> Best regards,
>
> Martien de Jong - martiendejong.nl
>
> 2011/3/5 gabor <gabordemo...@gmail.com>

gabor de mooij

unread,
Mar 6, 2011, 12:41:52 PM3/6/11
to redbe...@googlegroups.com
Have you tried to use utf8 instead of iso-8859-1 (latin-1)? might be
an HTML issue ?

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

mav

unread,
Mar 8, 2011, 10:22:03 AM3/8/11
to redbeanphp
Sounds like an iconv issue. It's known to truncate any remaining
output when it encounters a char that it can't handle.

Martien de Jong

unread,
Mar 9, 2011, 3:35:51 AM3/9/11
to redbe...@googlegroups.com
That did the trick, thanks a lot!
I wasn't aware that the html encoding is also used on the server.
Thanks for the help all.

--
Best regards,

Martien de Jong - martiendejong.nl


2011/3/8 mav <maciej....@gmail.com>

niknah

unread,
Sep 28, 2011, 9:13:31 AM9/28/11
to redbe...@googlegroups.com
I had this problem too.  I found that PDO updated the table with the correct characters but redbean chopped everything off after the non ascii character.
I fixed it by commenting out "1002 => 'SET NAMES utf8' in the connect() function in rb.php
And commenting out the other SET NAMES utf8 just above that.

Using redbean 2.01

gabor de mooij

unread,
Sep 28, 2011, 11:20:29 AM9/28/11
to redbe...@googlegroups.com
That will disable UTF8

> --
> You received this message because you are subscribed to the Google Groups
> "redbeanphp" group.

> To view this discussion on the web visit
> https://groups.google.com/d/msg/redbeanorm/-/L0FHcB34wzMJ.

Reply all
Reply to author
Forward
0 new messages