#311 "UTF8" & "UTF-8" act diff. in Char. Map "Encoding:" dropdown

Max Funk

As I reported before, if "UTF-8" is picked from the
"Encoding:" dropdown menu of the Character Map plugin,
the "Blocks:" dropdown menu is greyed out. However, if
I delete the hyphen so that it reads "UTF8" instead of
"UTF-8", it works. Eh?


  • wrstl prmpft

    wrstl prmpft - 2005-01-04

    Logged In: YES

    I want to draw attention to this bug, which is open for half a
    year... no pressure intended, but I think the fix should be very
    very easy, as it is just a typo (UTF8 works, but UTF-8 does
    not display the unicode codepages at all, but the ASCII ones).

    And it would make the CharacterMap usable out of the box (or
    out of the Plugin Manager).

    sorry for the rant. if i have time (does not look good at the
    moment) I will have a look at the code myself.

  • Jonathan Murphy

    Jonathan Murphy - 2005-11-19

    Logged In: YES

    AFAICS the problem lies in CharacterMap.java line 194:

    blocks.setEnabled(encoding.equals("Unicode") | encoding.

    It should be "UTF-8" not "UTF8" and presumably should
    include other options like UTF-16.

    Same on lines 262,351

    I tried changing these lines to "UTF-8", recompiled and it
    fixed the problem.
    I don't know enough about Java to know how to enter
    something like "UTF.*"

  • Jonathan Murphy

    Jonathan Murphy - 2005-11-20

    Logged In: YES

    Here's a proper fix:

    In CharacterMap.java lines 194, 262 and 351, replace


  • Alan Ezust

    Alan Ezust - 2011-09-18
    • assigned_to: nobody --> mf3
  • Max Funk

    Max Funk - 2011-09-18

    It will be fixed now in version 1.3.

    (Probably old versions of jedit/java have sent only
    "UTF8" and "Unicode" to the character map.)

    @jhnmurphy: It is calculated now by a function using

    || encoding.toUpperCase().startsWith("UTF")
    || encoding.toUpperCase().startsWith("X-UTF");

  • Max Funk

    Max Funk - 2011-09-18
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks