Skip to content

Commit

Permalink
Fix issues with non-ASCII characters in move names
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhijeetKrishnan committed Apr 2, 2024
1 parent 945ca2c commit 1fab263
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/frame_service/wavu/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def _convert_json_move(move_json: Any) -> WavuMove:
id = _normalize_data(move_json["id"])
parent = _normalize_data(move_json["parent"])

name = html.unescape(_normalize_data(_process_links(move_json["name"])))
name = html.unescape(_process_links(move_json["name"]))

input = html.unescape(html.unescape(_normalize_data(move_json["input"]))).replace("*", "\\*")

Expand Down
4 changes: 2 additions & 2 deletions src/framedb/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class CharacterName(enum.Enum):
CLAUDIO = "claudio"
DEVIL_JIN = "devil_jin"
DRAGUNOV = "dragunov"
EDDY = "eddy"
FENG = "feng"
HWOARANG = "hwoarang"
JACK_8 = "jack-8"
Expand All @@ -37,7 +38,6 @@ class CharacterName(enum.Enum):
ZAFINA = "zafina"
LEROY = "leroy"
VICTOR = "victor"
EDDY = "eddy"

def pretty(self) -> str:
return self.value.replace("_", " ").title()
Expand All @@ -54,6 +54,7 @@ def url_encode(self) -> str:
CharacterName.CLAUDIO: ["cld", "cla"],
CharacterName.DEVIL_JIN: ["dj", "deviljin", "dvj", "djin"],
CharacterName.DRAGUNOV: ["drag", "sergei", "dragu"],
CharacterName.EDDY: ["ed"],
CharacterName.FENG: ["fen"],
CharacterName.HWOARANG: ["hwo"],
CharacterName.JACK_8: ["j8", "jack8", "jack"],
Expand All @@ -79,7 +80,6 @@ def url_encode(self) -> str:
CharacterName.ZAFINA: ["zaffy", "zaf"],
CharacterName.LEROY: ["ler"],
CharacterName.VICTOR: ["vic"],
CharacterName.EDDY: ["ed"],
}


Expand Down

0 comments on commit 1fab263

Please sign in to comment.