0
Fixed

User name with accent not well supported

Matthieu 6 years ago updated by Tom 5 years ago 8
Hi Tom,

It's been a while...
I just found out that when you add a user with an accent in his name ("Eléonore" e.g.), then the system understands it, and the user can login.
But when he clicks on the database he has access (Comics in my case), then he's back to the login screen. Again & again...

I resolved it by deleting the account and recreating it without the accent.

Logs were also showing a hint: "[login:Eléonore]"

Cheers,
Matthieu
Under review
Hi Matthieu,

Seems like a character encoding problem.

Ubooquity uses UTF-8 everywhere (except on the logs page, see below), so it supports kind of characters, including accents, kanjis, etc. I have not been able to reproduce the problem. On my side (Windows 7 + Firefox) everything works fine with accents in the user name.

The only explanation I can think of for now is if the browser does not respect the declared encoding (either when creating the user or when writing the session cookie) or if the configuration file has been edited with an external tool.

Could you let me know which browser you use, and on which operating system ?
Also if you have a text editor which lets you choose the display encoding, could you open the settings file ("preferences.xml") and check that you correctly see the accent when UTF-8 is selected ?


As for the logs, the "Eléonore" you see is the result of an UTF-8 file displayed whith the IEC 8859-1 encoding (probably the default of your browser). That because the logs page does not specify its encoding in the HTML head section of the page.
It's a bug, but which only affects display, not a symptom which could explain your problem (the log file itself, opened whith an editor in UTF-8 mode will display the correct "é" character).



Hi Tom,

Thanks for taking care so fast. And sorry, I should have provided those details :s

Browsers used were Safari on iOS (iOS 8.1.1 & 8.1.2) & on MAC OS Yosemite (10.10.1). Same behaviours observed.
Ubooquity is 1.6.0, on debian stable (wheezy 7.7), java 1.8.0_25, http, without proxying.

For the logs I checked in command line and indeed the accent was well there. So ok for the logs, coming from the browser apparently.

Then I recreated a user with an accent. Same issue appeared again in Safari on OS X. However everything went well in firefox, indeed, as you experienced o_O
So this would make this a pure safari issue... (which is not good for the compatibility of ubooquity, in any case).
In command line, preferences.xml well displayed the user name with the accent.

Then I found out that indeed my safari setting (on OS X) was not on UTF-8 (but "Occidental (ISO Latin 1)"). I don't remember if I set this or if this is the default setting.
Anyway, despite being now set on UTF-8, I still have the issue :-(
In the logs the user logs in well, with the accent (both in command line & browser now, which indicates the setting has well been taken into account).

I restarted safari (in case...): UTF-8 setting remains, but as well as the issue unfortunatly.

Let me know how I can help you dig into this.
Cheers,
Matthieu
I have an ipad, I'll try to reproduce the problem on my side. Thanks for the details.
Problem reproduced on iPad. Seems like Safari doesn't like accents in its cookies.
Not very hard to fix, so it'll be done in the next version.