Error with Accents in a Properties

Discussion in 'Spigot Plugin Development' started by Sonicboum, Aug 8, 2018.

  1. Hello again.

    I am very confused ...
    I have 2 methods that do exactly the same thing.

    She retrieves a sentence with an accent in a file.

    One of the methods works well and puts the accents as it should.
    The other works too but unfortunately the bug focus.

    There is no error in the console.

    Here is the method that works:

    https://pastebin.com/FatXpkDb

    Here is the file for the method that works:

    https://pastebin.com/qf2rFfZs

    Here is the method that does not work:

    https://pastebin.com/6Ug3Fhmw

    Here is the file for the method that does not work:

    https://pastebin.com/jsMEZdBX

    Thank you for your help.
    It's been awhile since I'm on it I still do not understand where the problem comes from.
     
  2. second method return empty list? Or does not write well the accent?
     
  3. I can see that in the method I add the message well.

    Instead of getting "Défault" I get "Dà}fault".
     
  4. try add "UTF8" to FileInputStream
    like this:
    new FileInputStream(FILE_PLUGIN + AUTOMESSAGE_FILE, "UTF8");
     
  5. This does not work, this method can not accommodate this value.
     
  6. and with UTF-8 ?
    instead of UTF8
     
  7. no the following method can not work
    new FileInputStream(FILE_PLUGIN + AUTOMESSAGE_FILE, "UTF8");
     
  8. new FileInputStream(FILE_PLUGIN + AUTOMESSAGE_FILE, "UTF-8 ");
    instead of
    new FileInputStream(FILE_PLUGIN + AUTOMESSAGE_FILE, "UTF8")
     
  9. I'm sorry but I can not use your method.
    She does not accept more argument.
    [​IMG]
     
  10. ahah sorry,
    wait i open the IDE
    xd
     
  11. Aucun problème.
    Ce n'est pas important.
     
  12. What I do not understand is that the 2 methods are the same, but one of the 2 does not work ...
     
  13. I just found the solution.
    I come back to you to give it to you.