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

目前 文字太長就會變成亂碼 有辦法修理嗎? #30

Open
LIMichael opened this issue Mar 29, 2017 · 7 comments
Open

目前 文字太長就會變成亂碼 有辦法修理嗎? #30

LIMichael opened this issue Mar 29, 2017 · 7 comments

Comments

@LIMichael
Copy link

我想說一下 目前 文字太長就會變成亂碼 有辦法修理嗎?
案例:
  https://logbot.g0v.tw/channel/g0v.tw/2017-03-29#10

@godfat
Copy link
Member

godfat commented Mar 30, 2017

可能要看一下原始資料是什麼。你說因為文字太長,所以我在想是不是有幾個 bytes 被切斷。但這有點說不通,因為裡面的英文是好的,前段跟後段又都是亂碼。我懷疑是 cinch 又有什麼 encoding 問題,記得之前處理過類似的問題

沒記錯的話,因為有些訊息會被切斷,因此 cinch 有他自己重組訊息的方式,那邊可能有點問題

@godfat
Copy link
Member

godfat commented Mar 30, 2017

你知道原文是什麼嗎?我測試看看。不過那句話是來自 Slack, 也有可能是 Slack 到 IRC 這段有問題

@LIMichael
Copy link
Author

LIMichael commented Mar 30, 2017

原始的文字是這個 該發言 URL 任意門
/*
嗨各位,明天 3/30 下午有一個 NCC 辦的論壇:網路訊息事實查核機制分享會議,我們這邊有幾位夥伴會一起去: @isabelhou @aelcenganda @ggm @MrOrz @Lucien ,下面這個是我們預計會發言的內容,和討論的共筆 https://hackmd.io/s/HyAgG5vhg ,大家有想到要提問、補充或是參與討論的,可以直接寫在上面,不過上面還有點空因為我們預計是明天中午才會見面討論
*/

@godfat
Copy link
Member

godfat commented Mar 30, 2017

我快速測了一下的結果是,太長應該只會切掉後面而已,不會讓整段變成亂碼

目前懷疑是 Slack 到 IRC 這段有問題

@caasi
Copy link
Member

caasi commented Mar 30, 2017

之前有朋友跟我提到 IRC message 有長度限制,翻了一下 RFC 如下:

IRC messages are always lines of characters terminated with a CR-LF
(Carriage Return - Line Feed) pair, and these messages SHALL NOT
exceed 512 characters in length, counting all characters including
the trailing CR-LF. Thus, there are 510 characters maximum allowed
for the command and its parameters. There is no provision for
continuation of message lines. See section 6 for more details about
current implementations.

剛剛 @godfat 測試,在 453bytes 就斷掉了,不知道原因為何。斷掉後在 irssi 跟 irccloud 看記得都是好的,只有 Logbot 會全部變亂碼。

另外我記得這問題不是第一次討論, Logbot 剛上線時就討論過的樣子。

希望可以繼續討論出好的解法。

@caasi
Copy link
Member

caasi commented Mar 30, 2017

過去的

@godfat
Copy link
Member

godfat commented Mar 31, 2017

那看起來是 cinch 那段要看看。我晚點自己跑試試看。之前的問題照理說在這修好了 acc78bb

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

No branches or pull requests

3 participants