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

types.Big5ToUtf8 or pttbbstypes.Big5ToUtf8 #161

Open
chhsiao1981 opened this issue Mar 17, 2021 · 2 comments
Open

types.Big5ToUtf8 or pttbbstypes.Big5ToUtf8 #161

chhsiao1981 opened this issue Mar 17, 2021 · 2 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed Review

Comments

@chhsiao1981
Copy link
Collaborator

Provide the github link(s) of the file#line (請提供 github 關於 code 的 link)

https://github.com/Ptt-official-app/go-openbbsmiddleware/blob/main/types/rune.go#L164
https://github.com/Ptt-official-app/go-pttbbs/blob/main/types/big5.go

What would you like to discuss (你想要討論什麼呢?~)

目前 go-openbbsmiddleware 是使用 types.Big5ToUtf8.

但是 go-pttbbs 後來也有相對應的 types.Big5ToUtf8.
因為 go-pttbbs 需要把 config 裡的 BBSNAME (utf8) 轉成 BBSNAME_BIG5 (big5).
用在 create-article 時的站名.

to discuss:

  1. 持續沿用 types.Big5ToUtf8, 因為 go-pttbbs 的是特例.
  2. 使用 pttbbstypes.Big5ToUtf8, 不需要重複寫一樣的 code.
@chhsiao1981
Copy link
Collaborator Author

types.Big5ToUtf8 是完全使用 pttbbs 裡的 code~
按照慣例. types 應該只要留 rune. Big5ToUtf8 部分應該要移到 go-pttbbs.

將會使用 pttbbstypes.Big5ToUtf8.

@chhsiao1981 chhsiao1981 added good first issue Good for newcomers help wanted Extra attention is needed labels Aug 24, 2021
@chhsiao1981
Copy link
Collaborator Author

We should follow golang convention and implement Big5UAO encoding as a separated repo:

https://pkg.go.dev/golang.org/x/[email protected]/encoding/traditionalchinese

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed Review
Projects
None yet
Development

No branches or pull requests

1 participant