Issues regarding UTF-8 for teams

Insert here your troubles, infos and request about YSoccer's technical questions.
Post Reply
stage7
Soccer fan
Soccer fan
Posts: 45
Joined: Thu Dec 08, 2005 12:07 am
Location: Albacete (Spain)
Contact:

Issues regarding UTF-8 for teams

Post by stage7 »

I've noticed team data files are encoded using ISO-8859, whereas some files (mostly Greek language files) are using UTF-16. As long as I turn a data file into UTF-8 the data contained within such file will become not properly readable for Yoda, or not readable at all. This is due to ISO-8859 supporting only 256 values.
  • Turning it into UTF-8 will make characters with accents use at least two in-game characters, rendering "FC Bayern München" like "FC Bayern München".
    On the other hand, trying to write a data file in UTF-16 makes Yoda show no data at all.
I'd really, really love to write every name the way it should be written, like "Ibrahimović" or "FK Željezničar", and I'm even willing to draw some characters beyond U0x3FF. Anyway, I think Yoda should be able to handle expanding ucode_10.png and ucode_14.png pictures that include extra characters, and just draw nothing if I want to render a character beyond U0x3FF and the image does not include it.

Straight to the point: could it be possible to include UTF-8/16 support for team data so I can write names in obscure alphabets?

Thank you very much.
Massimo32
Chapman's successor
Chapman's successor
Posts: 852
Joined: Wed Dec 29, 2004 1:14 pm
Location: Turin, Italy

Re: Issues regarding UTF-8 for teams

Post by Massimo32 »

I'm aware of the problem and I'm preparing a new database format:
- use of the YAML standard, in order to allow validation and also have human readability
- names instead of numeric constants (e.g. 0 -> plain)
- files will be encoded in UTF8 (or UTF16)
- skills values will be from 0 to 7
- it will be easy to add new fields (e.g. age) while keeping retro-compatibility

Here's an example:

Code: Select all

Name: INVENTORS
City: 
Country: CUS
Tactics: 3-4-3
Division: 1
Coach: LEONARDO DA VINCI
Stadium: 

Kits:
 - 
  Name: home
  Style: plain
  Shirt1: black
  Shirt2: black
  Shorts: black
  Socks: black
 - 
  Name: away
  Style: plain
  Shirt1: light gray
  Shirt2: light gray
  Shorts: light gray
  Socks: light gray
 - 
  Name: third
  Style: plain
  Shirt1: white
  Shirt2: white
  Shorts: white
  Socks: white
 - 
  Name: change1
  Style: plain
  Shirt1: black
  Shirt2: black
  Shorts: light gray
  Socks: light gray
 - 
  Name: change2
  Style: plain
  Shirt1: light gray
  Shirt2: light gray
  Shorts: black
  Socks: black

Players:
 -
  Name: ALESSANDRO
  Surname: VOLTA
  Number: 1
  Nationality: ITA
  Role: goalkeeper
  Hair type: smooth1
  Hair color: black
  Skin color: pink
  Price: 1.5M
  Skills: {Passing: 0, Shooting: 0, Heading: 0, Tackling: 0, Ball control: 0, Speed: 0, Finishing: 0}
 -
  Name: SAMUEL
  Surname: MORSE
  Number: 2
  Nationality: USA
  Role: right back
  Hair type: smooth1
  Hair color: white
  Skin color: pink
  Price: 1.9M
  Skills: {Passing: 5, Shooting: 3, Heading: 5, Tackling: 7, Ball control: 3, Speed: 7, Finishing: 4}
 -
  Name: BENJAMIN
  Surname: FRANKLIN
  Number: 4
  Nationality: USA
  Role: defender
  Hair type: smooth
  Hair color: brown
  Skin color: pink
  Price: 1.8M
  Skills: {Passing: 3, Shooting: 4, Heading: 7, Tackling: 7, Ball control: 5, Speed: 3, Finishing: 4}
 -
  Name: ALFRED
  Surname: NOBEL
  Number: 5
  Nationality: SWE
  Role: midfielder
  Hair type: smooth2
  Hair color: brown
  Skin color: pink
  Price: 2M
  Skills: {Passing: 5, Shooting: 4, Heading: 7, Tackling: 7, Ball control: 3, Speed: 4, Finishing: 5}
 -
  Name: JOHANN
  Surname: GUTENBERG
  Number: 3
  Nationality: GER
  Role: left back
  Hair type: special6
  Hair color: brown
  Skin color: pink
  Price: 1.6M
  Skills: {Passing: 3, Shooting: 4, Heading: 4, Tackling: 7, Ball control: 2, Speed: 7, Finishing: 5}
 -
  Name: CHARLES
  Surname: BABBAGE
  Number: 11
  Nationality: ENG
  Role: right wing
  Hair type: smooth4
  Hair color: gray
  Skin color: pink
  Price: 1.3M
  Skills: {Passing: 3, Shooting: 5, Heading: 4, Tackling: 3, Ball control: 5, Speed: 5, Finishing: 5}
 -
  Name: GUGLIEMO
  Surname: MARCONI
  Number: 9
  Nationality: ITA
  Role: midfielder
  Hair type: smooth4
  Hair color: brown
  Skin color: pink
  Price: 2M
  Skills: {Passing: 7, Shooting: 5, Heading: 3, Tackling: 7, Ball control: 4, Speed: 6, Finishing: 3}
 -
  Name: ANTONIO
  Surname: MEUCCI
  Number: 10
  Nationality: ITA
  Role: forward
  Hair type: special6
  Hair color: gray
  Skin color: pink
  Price: 2M
  Skills: {Passing: 7, Shooting: 4, Heading: 5, Tackling: 7, Ball control: 4, Speed: 5, Finishing: 3}
 -
  Name: THOMAS
  Surname: EDISON
  Number: 6
  Nationality: USA
  Role: left wing
  Hair type: smooth4
  Hair color: white
  Skin color: pink
  Price: 1.8M
  Skills: {Passing: 2, Shooting: 4, Heading: 7, Tackling: 4, Ball control: 4, Speed: 5, Finishing: 7}
 -
  Name: ISAAC
  Surname: NEWTON
  Number: 7
  Nationality: ENG
  Role: forward
  Hair type: smooth8
  Hair color: brown
  Skin color: pink
  Price: 1.9M
  Skills: {Passing: 6, Shooting: 3, Heading: 7, Tackling: 4, Ball control: 4, Speed: 3, Finishing: 7}
 -
  Name: ARCHIMEDES
  Surname: 
  Number: 8
  Nationality: GRE
  Role: forward
  Hair type: special6
  Hair color: white
  Skin color: pink
  Price: 2.25M
  Skills: {Passing: 4, Shooting: 5, Heading: 7, Tackling: 5, Ball control: 4, Speed: 4, Finishing: 7}
 -
  Name: ALAN
  Surname: TURING
  Number: 12
  Nationality: ENG
  Role: goalkeeper
  Hair type: smooth4
  Hair color: brown
  Skin color: pink
  Price: 1M
  Skills: {Passing: 0, Shooting: 0, Heading: 0, Tackling: 0, Ball control: 0, Speed: 0, Finishing: 0}
 -
  Name: LEVI
  Surname: STRAUSS
  Number: 13
  Nationality: USA
  Role: defender
  Hair type: special6
  Hair color: black
  Skin color: pink
  Price: 1.3M
  Skills: {Passing: 2, Shooting: 4, Heading: 7, Tackling: 7, Ball control: 3, Speed: 3, Finishing: 4}
 -
  Name: WILHELM CONRAD
  Surname: RONTGEN
  Number: 14
  Nationality: GER
  Role: defender
  Hair type: special6
  Hair color: black
  Skin color: pink
  Price: 1.3M
  Skills: {Passing: 4, Shooting: 3, Heading: 7, Tackling: 7, Ball control: 3, Speed: 3, Finishing: 3}
 -
  Name: NIKOLA
  Surname: TESLA
  Number: 15
  Nationality: SBM
  Role: midfielder
  Hair type: smooth2
  Hair color: brown
  Skin color: pink
  Price: 1.6M
  Skills: {Passing: 7, Shooting: 3, Heading: 3, Tackling: 7, Ball control: 4, Speed: 4, Finishing: 4}
 -
  Name: FRANK
  Surname: HORNBY
  Number: 16
  Nationality: ENG
  Role: forward
  Hair type: thinning
  Hair color: brown
  Skin color: pink
  Price: 1.3M
  Skills: {Passing: 3, Shooting: 3, Heading: 7, Tackling: 3, Ball control: 4, Speed: 3, Finishing: 7}
Post Reply