Console consult

Discussion in 'Bukkit News' started by Dinnerbone, Feb 25, 2011.

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

    EdGruberman

    No problem! I know just how frustrating all this complexity can be. That said, it's our choice to run CraftBukkit and the improvements Bukkit makes overall is exactly why you and I are motivated to working hard to gain that advantage. :)
     
  2. Offline

    Zero9195

    Does anyone else get this error when typing for example "ü, ö, ä" ? If so, is this getting fixed? or do I have to change something?
    Code:
    18:56:36 [SEVERE] null
    java.io.IOException: invalid UTF-8 first byte: -4
            at jline.UnixTerminal$ReplayPrefixOneCharInputStream.setInputUTF8(UnixTerminal.java:403)
            at jline.UnixTerminal$ReplayPrefixOneCharInputStream.setInput(UnixTerminal.java:384)
            at jline.UnixTerminal.readVirtualKey(UnixTerminal.java:172)
            at jline.ConsoleReader.readVirtualKey(ConsoleReader.java:1453)
            at jline.ConsoleReader.readBinding(ConsoleReader.java:654)
            at jline.ConsoleReader.readLine(ConsoleReader.java:494)
            at net.minecraft.server.ThreadCommandReader.run(ThreadCommandReader.java:25)
    
     
  3. The problem is that the console uses UTF8 and not Unicode (which is most likely what your OS uses).
     
  4. Offline

    Zero9195

    Ah, and can I change that? I'm using Ubuntu 9.x.
    Thanks for Help ;)
     
  5. Offline

    Zero9195

    It seems th Error was, that my PuTTY was not in UTF-8 encoding. Now it is and everything works just fine :)

    Thanks for help!
     
  6. You hadn't mentioned you were remoting in. Different matter entirely, but congrats.
     
  7. Offline

    EvilSeph

    If any GUI or wrapper coders that are still battling with JLine read this, contact me as I'm looking for testers of a fix I've made. If you don't fall into this category, don't bother PM'ing me as you'll likely be ignored.
     
  8. Offline

    EdGruberman

    Build #794 now has the -nojline option available that disables all this simply now. Thank you @EvilSeph !
     
  9. Offline

    MadMonkeyCo

    The -nojline still doesn't remove the annoying >. All I get by reading the output is
    Code:
    146 recipes
    16 achievements
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    >
    Is there a way to get the output of the line, not the newly inserted > symbol? (BTW I'm using C# as well)
     
  10. Offline

    EvilSeph

    You sure you have the right version? Show me the input of 'version' in console, please.
     
  11. Offline

    MadMonkeyCo

    Code:
    >version
    2011-05-19 17:37:14 [INFO] This server is running ←[32mCraftbukkit←[37m version ←[32mgit-Bukkit-0.0.0-749-g7510886-b796jnks (MC: 1.5_02)←[0m
    2011-05-19 17:37:14 [INFO] This server is also sporting some funky dev build of Bukkit!←[0m
    2011-05-19 17:37:14 [INFO] Unknown console command. Type "help" for help.
    >
    Here's my startup script:
    Code:
    @echo off
    java -Xms1024M -Xmx1024M -jar craftbukkit.jar -nojline
    pause
     
  12. Offline

    EvilSeph

    Yea, I screwed up when I tried to optimise it. I'll fix it. ._.

    @MadMonkeyCo try b797 and let me know how it goes please :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 10, 2016
  13. Offline

    MadMonkeyCo

    I tried the new build but sadly it did not work, now I just got empty space instead of >
    Am I doing something wrong in code?
    Code:
    private void updateOutput(object sender, DataReceivedEventArgs e)
    {
        AddText(e.Data);
    }
    I assume you understand some programming. AddText method is there to prevent threading exceptions.
     
  14. Offline

    EdGruberman

    b798 "works for me"
     
  15. Offline

    EvilSeph

    @MadMonkeyCo b798 should fix your problems. I only addressed the issues I was made aware of, b798 should completely disable the JLine modifications.
     
  16. Offline

    MadMonkeyCo

    Yeh this works now, didn't know that you used the error stream instead of the output stream for 'output'. But ti's alright :D
     
Thread Status:
Not open for further replies.

Share This Page