From 97e5c29cf59c1efd889f250e7ea88c723f84aec7 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Sat, 13 Jan 2024 17:15:02 -0500 Subject: [PATCH] frontend: utf16 -> utf8 --- core/frontend.py | 28 ++++++++++++++-------------- titles/chuni/frontend.py | 2 +- titles/idac/frontend.py | 2 +- titles/ongeki/frontend.py | 2 +- titles/pokken/frontend.py | 2 +- titles/wacca/frontend.py | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/core/frontend.py b/core/frontend.py index 1165015..08b74d5 100644 --- a/core/frontend.py +++ b/core/frontend.py @@ -180,7 +180,7 @@ class FE_Base(): title=self.core_config.server.name, game_list=self.environment.globals["game_list"], sesh=vars(sesh) if sesh is not None else vars(UserSession()), - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") if sesh is None: resp.delete_cookie("DIANA_SESH") @@ -281,7 +281,7 @@ class FE_Gate(FE_Base): title=f"{self.core_config.server.name} | Login Gate", error=err, sesh=vars(UserSession()), - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") resp.delete_cookie("DIANA_SESH") return resp @@ -392,7 +392,7 @@ class FE_Gate(FE_Base): title=f"{self.core_config.server.name} | Create User", code=ac, sesh={"user_id": 0, "permissions": 0}, - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") class FE_User(FE_Base): async def render_GET(self, request: Request): @@ -483,7 +483,7 @@ class FE_User(FE_Base): success=succ, username=user['username'], arcades=arcade_data - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") async def render_logout(self, request: Request): resp = RedirectResponse("/gate/", 303) @@ -557,7 +557,7 @@ class FE_System(FE_Base): title=f"{self.core_config.server.name} | System", sesh=vars(usr_sesh), usrlist=[], - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") async def lookup_user(self, request: Request): template = self.environment.get_template("core/templates/sys/index.jinja") @@ -590,7 +590,7 @@ class FE_System(FE_Base): sesh=vars(usr_sesh), usrlist=usrlist, shoplist=[], - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") async def lookup_shop(self, request: Request): shoplist = [] @@ -624,7 +624,7 @@ class FE_System(FE_Base): usrlist=[], shoplist=shoplist, error=4 - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") if sn_search: sn_search = sn_search.upper().replace("-", "").strip() @@ -653,7 +653,7 @@ class FE_System(FE_Base): usrlist=[], shoplist=shoplist, error=10 - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") return Response(template.render( @@ -661,7 +661,7 @@ class FE_System(FE_Base): sesh=vars(usr_sesh), usrlist=[], shoplist=shoplist, - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") class FE_Arcade(FE_Base): async def render_GET(self, request: Request): @@ -677,14 +677,14 @@ class FE_Arcade(FE_Base): return Response(template.render( title=f"{self.core_config.server.name} | Arcade", sesh=vars(usr_sesh), - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") sinfo = await self.data.arcade.get_arcade(shop_id) if not sinfo: return Response(template.render( title=f"{self.core_config.server.name} | Arcade", sesh=vars(usr_sesh), - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") cabs = await self.data.arcade.get_arcade_machines(shop_id) cablst = [] @@ -705,7 +705,7 @@ class FE_Arcade(FE_Base): "cabs": cablst } - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") class FE_Machine(FE_Base): async def render_GET(self, request: Request): @@ -721,13 +721,13 @@ class FE_Machine(FE_Base): return Response(template.render( title=f"{self.core_config.server.name} | Machine", sesh=vars(usr_sesh), - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") return Response(template.render( title=f"{self.core_config.server.name} | Machine", sesh=vars(usr_sesh), arcade={} - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") cfg_dir = environ.get("DIANA_CFG_DIR", "config") cfg: CoreConfig = CoreConfig() diff --git a/titles/chuni/frontend.py b/titles/chuni/frontend.py index ed58d52..724d447 100644 --- a/titles/chuni/frontend.py +++ b/titles/chuni/frontend.py @@ -44,7 +44,7 @@ class ChuniFrontend(FE_Base): title=f"{self.core_config.server.name} | {self.nav_name}", game_list=self.environment.globals["game_list"], sesh=vars(usr_sesh) - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") async def update_name(self, request: Request) -> bytes: usr_sesh = self.validate_session(request) diff --git a/titles/idac/frontend.py b/titles/idac/frontend.py index 1441833..28fa624 100644 --- a/titles/idac/frontend.py +++ b/titles/idac/frontend.py @@ -141,4 +141,4 @@ class IDACFrontend(FE_Base): rank=rank, sesh=vars(usr_sesh), active_page="idac", - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") diff --git a/titles/ongeki/frontend.py b/titles/ongeki/frontend.py index 310e8f6..36fb7d0 100644 --- a/titles/ongeki/frontend.py +++ b/titles/ongeki/frontend.py @@ -64,7 +64,7 @@ class OngekiFrontend(FE_Base): version_list=self.version_list, version=self.version, sesh=vars(usr_sesh) - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") else: return RedirectResponse("/gate/", 303) diff --git a/titles/pokken/frontend.py b/titles/pokken/frontend.py index 9fb9ccf..ad2c305 100644 --- a/titles/pokken/frontend.py +++ b/titles/pokken/frontend.py @@ -74,7 +74,7 @@ class PokkenFrontend(FE_Base): profile=pf, error=err, success=succ - ), media_type="text/html; charset=utf-16") + ), media_type="text/html; charset=utf-8") async def change_name(self, request: Request) -> RedirectResponse: usr_sesh = self.validate_session(request) diff --git a/titles/wacca/frontend.py b/titles/wacca/frontend.py index 5151f97..93acbcc 100644 --- a/titles/wacca/frontend.py +++ b/titles/wacca/frontend.py @@ -43,4 +43,4 @@ class WaccaFrontend(FE_Base): title=f"{self.core_config.server.name} | {self.nav_name}", game_list=self.environment.globals["game_list"], sesh=vars(usr_sesh) - ), media_type="text/html; charset=utf-16") \ No newline at end of file + ), media_type="text/html; charset=utf-8") \ No newline at end of file