Strange characters in chat using text-based ChatColor

Discussion in 'Plugin Development' started by SaxSalute, Aug 6, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    SaxSalute

    [​IMG]

    Only pay attention to the last line of chat. This is the result of pulling "§4DEV" from my ResourceBundle where ChatColors have to be specified using § notation because of differences in color between the different language servers. I have no clue what's causing this, as I have used these same resource strings and formatting methods in other plugins without incident. Any ideas?
     
  2. Offline

    AcePilot10

    Could we see your code?
     
  3. Offline

    SaxSalute

    I can't really give much since this is all woven into an enum of account ranks. The relevant information is that I'm getting �4DEV out of the ResourceBundle instead of §4DEV. I'm certain that this is the point of the issue, I just don't know why it's happening.

    Getting the resource is <ResourceBundle>.getString("rank.dev")

    And that is the resource line "rank.dev=§4DEV"

    EDIT: More specifically, the § character is being read as �
     
    Last edited: Aug 6, 2015
  4. You need to compile/save in UTF-8
     
  5. Offline

    SaxSalute

    How would I go about specifying that/checking what it's being compiled as? I've checked my pom files on other projects, and they work perfectly without explicitly specifying UTF-8. Where else could that setting be?
     
  6. I think it's on *right click project*, properties, compiling
     
  7. Offline

    1Rogue

    Or just use color codes, and ChatColor#translateAlternateColorCodes
     
Thread Status:
Not open for further replies.

Share This Page