mirror of
https://github.com/shareAI-lab/analysis_claude_code.git
synced 2026-09-22 05:13:48 +08:00
fix: use UTF-8 for text file operations
This commit is contained in:
@@ -41,7 +41,7 @@ def safe_path(p: str) -> Path:
|
||||
return path
|
||||
|
||||
def run_read(path: str, limit: int = None) -> str:
|
||||
text = safe_path(path).read_text()
|
||||
text = safe_path(path).read_text(encoding="utf-8")
|
||||
lines = text.splitlines()
|
||||
if limit and limit < len(lines):
|
||||
lines = lines[:limit]
|
||||
|
||||
Reference in New Issue
Block a user