Don't use the default locale for machine-readable output, use Locale.US instead

Description

See also: http://developer.android.com/reference/java/util/Locale.html#default_locale

Example

You should also be wary of the toLowerCase() and toUpperCase() overloads that don't take a Locale: in Turkey, for example, the characters 'i' and 'I' won't be converted to 'I' and 'i'. This is the correct behavior for Turkish text (such as user input), but inappropriate for, say, HTTP headers.

The following methods should be switched to their counterpart that takes a Locale as argument when they are used for machine-readable output:

  • String.format()

  • String.toUpperCase()

  • String.toLowerCase()

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created December 10, 2013 at 9:41 PM
Updated August 17, 2014 at 1:11 PM
Resolved April 6, 2014 at 10:17 AM