Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EUC-JISX0213の文字列の読み込みをDataから行うようにする #141

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

mtgto
Copy link
Owner

@mtgto mtgto commented Mar 31, 2024

#82 で行ったlibiconvによるEUC-JISX0213の読み込みの処理はURLのextensionとして実装しました。
skkservへの接続対応で、XPCでもEUC-JISX0213形式のデコードがやりたいため、URLではなくDataのextensionとして実装します。

return try String(contentsOf: url, encoding: .japaneseEUC)
} catch {
return try url.eucJis2004String()
}
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macOS標準のデコードのフォールバックでやる必要ももうないだろうと思ったので、EUC-JPのときは最初からiconvでデコードします。

@mtgto mtgto force-pushed the euc-jis-2004-data-extension branch from f23a27d to 6deafa2 Compare March 31, 2024 09:44
@mtgto mtgto merged commit 6b9aa11 into main Apr 5, 2024
2 checks passed
@mtgto mtgto deleted the euc-jis-2004-data-extension branch April 5, 2024 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant