jline/jline2 — pull request #105 by jroper (2013-09-19 03:03:54+00:00)
Title: Correctly parse LC_CTYPE when a modifier is present

The POSIX standard says the format for `LC_CTYPE` is:

[language[_territory][.codeset][@modifier]]

This ensures that the modifer is removed if present when the encoding is parsed from the `LC_CTYPE` environment variable. For example, `fr_FR.utf-8@euro` is a valid `LC_CTYPE`, but currently the `getEncoding` method returns `utf-8@euro`.

See the POSIX standard for more details:

http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html