Active
Project:
References
Version:
7.x-2.0-beta3
Component:
Code: node_reference
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Nov 2011 at 18:07 UTC
Updated:
21 Nov 2014 at 13:34 UTC
Jump to comment: Most recent
Comments
Comment #1
joelrichard commentedI'm very surprised that this hasn't received any comments in three years. Since this is a huge problem for me and my body of data, I'm going to debug it and paste a patch here.
Initial investigation reveals that the problem is occurring on or around line 672 of node_reference/node_reference.module:
Using strcmp() also products the same, incorrect result.
A visual check of those values shows they are they same, but for whatever reason, even though both of my strings are UTF-8, they are coming up as different. An acute accented french e (é in HTML entity terms) gives me two different results when I look at the bytes. In the case of the $title field, I have two bytes (values 195 and 169 which are LATIN SMALL LETTER E WITH ACUTE). In the case of the $real_title, I get three bytes (101, 204, 129). The101 is the "e" and the 204 and 129 are "COMBINING ACUTE ACCENT". So these are encoded very differently somehow.
Even using mb_convert_encoding() or iconv() I still get different results. This is very strange to me. :) I will keep investigating as I can.
Comment #2
joelrichard commentedAnother source of my particular issues may be with where the data is coming from. I.e. it was imported. But then the browser may be doing strange things to do the data when it's being displayed in the text boxes for the node reference.
This has just gotten more complicated. :)
Also, even if I use
iconv('UTF-8','ASCII//TRANSLIT',$title)I still get different results. Frustrating.