Hi,
Made new issue, but may be related to: http://drupal.org/node/910726
I got this error using latest dev:

>
MongoException: non-utf8 string:  in MongoCollection->save() (line 198 of /sites/all/modules/mongodb/mongodb_field_storage/mongodb_field_storage.module)

Is the patch in #910726: Drupal Crashes when writting utf8 to page cache or someone else in mongodb may be not complete?
Greetings, Martijn

Comments

giorgio79’s picture

I am getting this as well, and cannot do a migration as drush halts with this error. Adding mongo.utf8 = 0 to php.ini no longer works as it worked only up to Mongodb 1.1.

Perhaps the module could add iconv function
http://stackoverflow.com/questions/5920626/mongodb-php-utf-8-problems

giorgio79’s picture

I researched this further, and I see lots of issues:

I notice the module files have utf8 without bom encoding according to notepad++, but drupal modules should be either utf8 or ansi.

I also printed out the entity where mongo complains, and the node title and the geofield seem garbled, but these are proper utf8 columns in mysql, so either drush or mongodb module messes the data up.

    [title] => Academy Golf Ãtterem
    [uid] => 1
    [status] => 1
    [created] => 1337348955
    [changed] => 1371556742
    [comment] => 2
    [promote] => 1
    [sticky] => 0
    [tnid] => 0
    [translate] => 0
    [field_r_fax] =>
    [field_r_email] =>
    [field_r_website] =>
    [field_r_contact_person] =>
    [field_r_description] =>
    [field_r_capacity] =>
    [field_r_address] => Array
        (
            [country] => HU
            [administrative_area] =>
            [sub_administrative_area] =>
            [locality] => Budapest
            [dependent_locality] =>
            [postal_code] => 1037
            [thoroughfare] => Perényi út 6.
            [premise] =>
            [sub_premise] =>
            [organisation_name] =>
            [name_line] =>
            [first_name] =>
            [last_name] =>
            [data] =>
        )
    [field_r_geofield] => Array
        (
            [geom] => F_A±3@ñë©ÅG@
            [geo_type] => point
            [lat] => 47.5442382
            [lon] => 19.0261475
            [top] => 47.5442382
            [bottom] => 47.5442382
            [right] => 19.0261475
            [left] => 19.0261475
            [geohash] => u2mw2znmm27u4
        )

PS: Geofield geom data seems suspicious. It is stored as bin in mysql, and mongo seems to choke on it. Raised a new issue for that #2022281: Ability to specify Mongo Bin Data for fields

marcingy’s picture

Status: Active » Closed (won't fix)

This is not a mongo issue, data sent to mongo should be utf-8

marcingy’s picture

Issue summary: View changes

kughukg