arved / PHP-Push-2-owncloud

PHP-Push-2 with CalDAV/LDAP + CardDAV for owncloud 5
GNU Affero General Public License v3.0
13 stars 4 forks source link

Crazy encoding error #5

Open magcks opened 11 years ago

magcks commented 11 years ago

If I update the name (on Android) of a contact to: First name: "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aüaaaa Aaaaa" Last name: "Aaaaaa"

The following will be saved on ownCloud: First name: "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aüaaaa Aaaaa" Last name: "Aaaaaa"

The crazy thing is when I set the name to the following it will work perfectly: First name: "Aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaüaaaa Aaaaa" (removed one space) Last name: "Aaaaaa"

As you can see this happens only on contacts with very long (or very much) names.

I have an person with 7 first names in my contact list and an umlaut in the 6th one (so this can happen for other users).

Could the solution probably be using the "w2ui"-function I referred to in https://github.com/arved/PHP-Push-2-owncloud/issues/2?

w2ui() does something with encoding. (It is natively provided by Z-Push /lib/utils/utils.php)

arved commented 11 years ago

there is much more needful stuff in the utils.php see my last commit regarding the FN issue. unfortually I cannot reproduce the behavoir your describing, so I cant do any unit tests here.

magcks commented 11 years ago

Okay, probably it is an Android issue. This behavior only occurs if the fist word is very large and the seconds has an umlaut in it.

arved commented 11 years ago

maybe, we should wait until someone else can check and confirm it?

magcks commented 11 years ago

Yeah, that's a good idea.

arved commented 11 years ago

Please confirm this issue with the last commit.

magcks commented 11 years ago

I'll check it on the weekend.

magcks commented 11 years ago

Currently no changes from the android are working. If I delete or add something on the phone it won't be synced to owncloud. Only if I change something on owncloud it will be synced to the phone.

arved commented 11 years ago

config.php: define('CARDDAV_READONLY_OC5', true); ?

magcks commented 11 years ago

Nope, it was set to false. The writing of CalDav doesn't work for me too.

This is the log (I added a calendar event): https://gist.github.com/justbrain/eda50e1a53eaee2b9781