refactor: migrate runtime and resources to UTF-8 first - #3
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3ff282413
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary of ChangesHello @comfuture, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 풀 리퀘스트는 프로젝트를 UTF-8 우선 모델로 전환하여 정확성과 이식성을 향상시키는 것을 목표로 합니다. 기존 CP949 인코딩에 대한 가정을 제거하고, 리소스 및 텍스트를 UTF-8로 정규화하며, 새로운 UTF-8 유틸리티를 도입하고, 플레이어 이름 및 경로 처리 방식을 유니코드 기반으로 변경하며, 소켓 입력 파이프라인에 엄격한 UTF-8 처리를 적용합니다. 또한, 관련 문서와 테스트 시나리오도 업데이트되었습니다. Highlights
Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이 PR은 프로젝트 전반에 걸쳐 CP949 인코딩 의존성을 제거하고 UTF-8을 기본으로 사용하도록 전환하는 중요한 리팩토링입니다. 문서 파일들의 인코딩을 변환하고, 새로운 UTF-8 정책을 README.md 등에 명확히 문서화한 점이 인상적입니다.
docs/** 범위 내의 레거시 문서에서 자동화된 인코딩 변환 과정에서 발생한 깨진 문자나 오타 등의 불일치가 발견되었으나, 프로젝트 정책에 따라 이러한 원본 레거시 문서는 현재 상태 그대로 유지하며 수정하지 않습니다. 따라서 해당 문서들에 대한 수정 제안은 제외되었습니다.
|
Addressed the two open review threads in commit
Validation:
|
Summary
This PR migrates the project to a UTF-8 first model across resources, runtime input handling, string logic, tests, and docs.
Why
The previous implementation depended on CP949 assumptions (2-byte Hangul handling, CP949 smoke setup, byte-based suffix/length logic), which caused correctness and portability problems on modern UTF-8 environments.
Changes
1) Resource and text normalization
2) UTF-8 utility layer
/Users/comfuture/Project/muhan/src/utf8_text.cand/Users/comfuture/Project/muhan/src/utf8_text.h.3) Unicode name + player path refactor
first_han()path fanout usage with SHA-1 2-char sharding path generation.4) Remove CP949 2-byte assumptions
len-2with UTF-8 suffix helpers.5) Strict UTF-8 socket input pipeline
/Users/comfuture/Project/muhan/src/io.caccept_input()to strict UTF-8 handling.6) Smoke/tests and docs
Compatibility notes
Validation
./scripts/run-smoke.shafter each atomic stage and again on final HEAD.Atomic commits included
93cd8acchore: normalize legacy byte-path resources to utf8-safe tree86c3f23chore: convert cp949 text assets and source files to utf-87a0c43bfeat: add utf8 utility layer for validation and codepoint operations3149e4brefactor: support unicode player names and sha1-sharded player paths8030273refactor: replace cp949 byte-based string logic with unicode codepoint logic2dea390refactor: enforce strict utf-8 handling in socket input pipelineb59f934test: migrate smoke scenarios to utf-8 and add unicode edge casesb3ff282docs: document utf-8 first runtime and migration constraintse6d49edfix: stabilize utf-8 smoke checks on mac and arm runnersLatest CI stabilization update
f444a60fix: make smoke scenario resilient across ci runnersSMOKE_UTF8_EDGEopt-in.Runtime safety fix after password-input report
5b5dde2fix: ensure password null termination in character creation/Users/comfuture/Project/muhan/src/command1.c, character-creation password copy now guarantees NUL termination.Runtime crash fix for nc/telnet character creation path
c4a698bfix: prevent server crash on character init room load failures/Users/comfuture/Project/muhan/src/player.cinit_ply()now returns success/failure and safely handles fallback room load failure without NULL dereference./Users/comfuture/Project/muhan/src/command1.cinit_ply()result and terminate session safely with an explicit error message when initialization fails./Users/comfuture/Project/muhan/src/files1.c/Users/comfuture/Project/muhan/src/mextern.hinit_plydeclaration to returnint.ncon password submission before fix.MUHAN_HOMEset/unset)../scripts/run-smoke.shsuccessfully.Latest runtime fix (init error + nc disconnect symptom)
14dcba3fix: recover login flow on init failure and tolerate legacy room blobs/Users/comfuture/Project/muhan/src/command1.cinit_ply()failure (both login/create paths), do not hard-disconnect./Users/comfuture/Project/muhan/src/player.c/Users/comfuture/Project/muhan/src/files1.c"서버 초기화 중 오류가 발생했습니다."path../scripts/run-smoke.shsuccessfully.