Menu

#307 Console output cannot handle non-ascii names

1.7.3.1
closed
3
2012-10-13
2011-07-14
Chase
No

This will require a little explanation. A robot whose name has an non-ascii character in it is unable to output to things that use robocode by commandline.

When saving a battle file, these characters get escaped. as such things like "cs.Yōkai 1.0" becomes "cs.Y\u014Dkai 1.0" in these. In however the console output this robot is output as "cs.Y?kai 1.0". In the actual GUI version these robots work fine.

Being replaced with a ? if nothing else causes RoboResearch to not recognize it as the same robot. Making testing difficult, may effect other things.

I am suggesting robots with non-ascii characters get escaped on the console.

Discussion

  • Chase

    Chase - 2011-07-14

    An example of the ? being placed.

     
  • Chase

    Chase - 2011-07-14

    Not this error is not about these robots failing to be allowed to participate, the example is only about the placement of the ? in the name. (How else was I going to get it to display)

     
  • Chase

    Chase - 2011-07-14

    I also notice this error occurs in robot result files.

     
  • Flemming N. Larsen

    Hi Chase, I have made a fix I want you to try out.
    It is put in a new 1.7.3.1 Alpha version here:

    http://robocode.sf.net/files/robocode-1.7.3.1-Alpha-setup.jar

    Tell me if it works. It is consistent with the .battle file syntax.

     
  • Chase

    Chase - 2011-07-20

    Does not appear to be fixed, the console still uses a ? for an unknown character, and so does the result files.

     
  • Chase

    Chase - 2011-07-20

    Battle results example error

     
  • Flemming N. Larsen

    A fix is included with version 1.7.3.1. It works for me, but I need to check it further to see why it does not work for chase-san.

     
  • Chase

    Chase - 2011-07-29

    As long as you are certain it is fixed in the result files it should be okay.

    Does not appear to be fixed when writing the battle file, it appears to still be a ? in these. Allow me to upload an example results files. (Perhaps in running it from the RobocodeEngine makes these files appear wrong?)

     
  • Chase

    Chase - 2011-07-29

    BattleResult Error Again

     
  • Chase

    Chase - 2011-07-29

    Could it just be a windows thing?

    Unfortunately I am in no way able to really build and work on robocode myself. As I do not even begin to understand Maven, how to use it, or so on.

     
  • Flemming N. Larsen

    Hi Chase,

    I should like to have the source file of the robot (or .jar) + the .battle file(s) containing the ?
    The .battle files in Robocode are stored as Java property files, where characters that does not fit into the ISO 8859-1 character are automatically encoded/decoded when saving and loading the property/battle file:

    http://download.oracle.com/javase/1.4.2/docs/api/java/util/Properties.html

    Actually, I encode all characters to the console that are not "Basic Latin" into \uxxxx representation. Hence, I don't understand why this is not working on your system. I tested under Windows 7 and Ubuntu/Linux.

     
  • Chase

    Chase - 2011-08-10

    RoboResearch integrated battle files show up with ? in their name. This may be a problem with that program.

     
  • Flemming N. Larsen

    If RoboResearch has this problem, it must be fixed in this application. :-)
    I might be able to help with that. Currently, I don't know this app at all (yet).

     
  • Flemming N. Larsen

    To my knowledge, everything that can be done within Robocode regarding this issue has been done.

     
  • Flemming N. Larsen

    • labels: Command Line --> Command Line, Non-ascii names
    • status: pending --> closed
    • milestone: 1.7.3 --> 1.7.3.1
     

Log in to post a comment.

MongoDB Logo MongoDB