Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17329 closed defect (fixed)

Can't type some special characters in text fields

Reported by: etienne Owned by: arthuredelstein
Priority: Medium Milestone:
Component: Applications/Tor Browser Version:
Severity: Normal Keywords: tbb-usability, tbb-regression, TorBrowserTeam201510R
Cc: arthuredelstein, mcs, brade Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hi,

Using Tor Browser 5.0.3, I can't type some characters from my French keyboard like ê (and ï) which suppose you first type the circumflex key and then the 'e' key. I've tested both the English and French version of the browser, with javascript on and off.

I'm running TB in Trisquel 7 linux. This OS is very similar to Ubuntu 14.04 with a Gnome Flashback desktop.

Thanks for your help :)

Child Tickets

Change History (17)

comment:1 Changed 3 years ago by gk

Cc: arthuredelstein added
Component: - Select a componentTor Browser
Keywords: tbb-fingerprinting tbb-regression TorBrowserTeam201510 added; accent special character french removed
Owner: set to tbb-team

My first guess is this is fallout from #15646. Does the alpha version work for you? Does 5.0.2 (https://dist.torproject.org/torbrowser/5.0.2/)?

comment:2 Changed 3 years ago by klonido

Keywords: tbb-fingerprinting-locale tbb-privacy-locale localization added

comment:3 Changed 3 years ago by gk

Keywords: tbb-fingerprinting-locale tbb-privacy-locale localization removed

Thanks for the additional keywords. But the ones I added are already enough to put this bug into the proper category.

comment:4 Changed 3 years ago by etienne

I've tested TB 5.0.2 and 5.5a3 (64 bits too) and had the same results.

But the 5.0.3 version I have on a KDE desktop on Debian is OK, so it has to do with Trisquel or with my configuration. Strange enough ... cause I have no trouble on the same system with Icecat or Abrowser which are based on Firefox just like TB.

Last edited 3 years ago by etienne (previous) (diff)

comment:5 Changed 3 years ago by gk

Keywords: tbb-usability added; tbb-fingerprinting tbb-regression TorBrowserTeam201510 removed

comment:6 Changed 3 years ago by arthuredelstein

Owner: changed from tbb-team to arthuredelstein
Status: newassigned

comment:7 Changed 3 years ago by arthuredelstein

Severity: Normal

I was able to reproduce this bug on standard Ubuntu 14.10 (Unity desktop), by setting the default keyboard layout to French.

By running a binary search over commits, I found this bug is caused by our patch for "Bug #5926: Allow JS locale to be set to English/C".

If I set the pref introduced by that patch, "javascript.use_us_english_locale", to false, and restart Tor Browser, it becomes possible to type these French special characters again.

The next step is to figure out how the patch causes this.

comment:8 Changed 3 years ago by gk

Keywords: tbb-regression added

comment:9 Changed 3 years ago by arthuredelstein

Status: assignedneeds_review

Here's a patch to fix this problem, for review:

https://github.com/arthuredelstein/tor-browser/commit/37d4e243f7ed4844e4b2388850b695aeea7ec9e8

It turns out that, on some Linux systems, using the "C" locale prevents keyboard input of non-ASCII characters.

If we use the "C.UTF-8" locale instead, then the keyboard input problem goes away. Windows does not have a "C.UTF-8" locale, so, in this patch, will fall back to the "C" locale (which is available on every system). On Windows, I confirmed that with the "C" locale, there is no keyboard input problem for international characters (such as the French special characters reported).

There is a concern that some odd versions of Linux may also lack a "C.UTF-8" locale. In this case, formatting by the "C" locale is distinguishable from the "C.UTF-8" locale. In order to fully avoid this problem, I think we would need to re-implement the various methods of Date (see #17355).

comment:10 Changed 3 years ago by arthuredelstein

Keywords: TorBrowserTeam201510R added

comment:11 Changed 3 years ago by gk

Status: needs_reviewneeds_revision

Could you please add a comment above the new code explaining what it does/why it is needed (and maybe referring to this ticket for more details)?

comment:12 in reply to:  11 Changed 3 years ago by arthuredelstein

Status: needs_revisionneeds_review

Replying to gk:

Could you please add a comment above the new code explaining what it does/why it is needed (and maybe referring to this ticket for more details)?

Good idea. Here's the new version:
https://github.com/arthuredelstein/tor-browser/commit/17329+2

comment:13 Changed 3 years ago by gk

Looks good to me.

comment:14 Changed 3 years ago by gk

Cc: mcs brade added

comment:15 Changed 3 years ago by mcs

r=mcs
I did not test this patch, but the reasoning and code seem sound.

comment:16 Changed 3 years ago by gk

Resolution: fixed
Status: needs_reviewclosed

This is commit 6e22e68547b2bac647c5a9c4e2c43eda2dc1c63b on tor-browser-38.3.0esr-5.5-2 and commit 6d36430a07b75db21fb4007f28cceb98adc23f35 on tor-browser-38.3.0esr-5.0-2, thanks.

comment:17 Changed 3 years ago by cypherpunks

This bug was reported for Linux platform, while fix changes code for all supported platforms. Why Mozilla so hard tries to detect default C locale to change it to "", specially for Windows?

Note: See TracTickets for help on using tickets.