4
9
Fork
You've already forked libchewing
3

關於 chewing_clean_bopomofo_buf() 與 chewing_set_ChiEngMode() 的運作行為請益 #776

Closed
opened 2025年11月24日 02:58:44 +01:00 by hiroshiyui · 3 comments
hiroshiyui commented 2025年11月24日 02:58:44 +01:00 (Migrated from github.com)
Copy link

您好:

我有一個操作場景是這樣的(使用 libchewing 146d99b170 ):

  1. 於注音狀態下輸入「ㄇㄠㄇㄧㄌ」使各緩衝區整體加起來為「貓咪ㄌ」
  2. 操作 chewing_set_ChiEngMode() 切換至英字符 (SYMBOL_MODE) 模式
  3. 操作 chewing_clean_bopomofo_buf() 使緩衝區清除注音符號緩衝區,緩衝區為「貓咪」
  4. 操作 chewing_handle_Default() 試圖輸入任一英字符(例如 'c'),並預期緩衝區會是「貓咪c」,然而此時 libchewing 仍會將此操作輸出注音符號,以大千鍵盤來說,就是「貓咪ㄏ」
  5. 然而若在上一步之前先操作 chewing_handle_Backspace() 再操作 chewing_handle_Default() 就會得到預期的「貓咪c」

我好奇是否 chewing_clean_bopomofo_buf() 並沒有如我預期的「清空」,而是含有 null character 之類的?

您好: 我有一個操作場景是這樣的(使用 libchewing 146d99b1700f0dcca99818442f9e28f37d30d0f1 ): 1. 於注音狀態下輸入「ㄇㄠㄇㄧㄌ」使各緩衝區整體加起來為「貓咪ㄌ」 2. 操作 `chewing_set_ChiEngMode()` 切換至英字符 (`SYMBOL_MODE`) 模式 3. 操作 `chewing_clean_bopomofo_buf()` 使緩衝區清除注音符號緩衝區,緩衝區為「貓咪」 4. 操作 `chewing_handle_Default()` 試圖輸入任一英字符(例如 'c'),並預期緩衝區會是「貓咪c」,然而此時 libchewing 仍會將此操作輸出注音符號,以大千鍵盤來說,就是「貓咪ㄏ」 5. 然而若在上一步之前先操作 `chewing_handle_Backspace()` 再操作 `chewing_handle_Default()` 就會得到預期的「貓咪c」 我好奇是否 `chewing_clean_bopomofo_buf()` 並沒有如我預期的「清空」,而是含有 null character 之類的?
kanru commented 2025年11月24日 03:21:47 +01:00 (Migrated from github.com)
Copy link

理論上 8097303403 之後的行為是在第二步 chewing_set_ChiEngMode() 之後就會清空注音符號緩衝區並回到輸入模式,接下來輸入的字都會是英文字符。

請確認是否用到對的版本

理論上 80973034037f7c9f4948ef80a6470340e2e225f1 之後的行為是在第二步 `chewing_set_ChiEngMode()` 之後就會清空注音符號緩衝區並回到輸入模式,接下來輸入的字都會是英文字符。 請確認是否用到對的版本
kanru commented 2025年11月24日 03:24:47 +01:00 (Migrated from github.com)
Copy link

BTW, git 主線上面有一個不相容的改變,我還在想要怎麼做資料遷移
如果要使用的話建議用 f5e34643

BTW, git 主線上面有一個不相容的改變,我還在想要怎麼做資料遷移 如果要使用的話建議用 f5e34643
hiroshiyui commented 2025年11月24日 03:28:41 +01:00 (Migrated from github.com)
Copy link

@kanru 感謝,確實是我這端的版本太舊 😅

@kanru 感謝,確實是我這端的版本太舊 😅
Sign in to join this conversation.
No Branch/Tag specified
master
release/0.13.x
push-qlrtqulwmpmp
push-wtuvoynpwosl
release/0.10.x
release/0.8.x
optimize-conversion
refactor-trie-loader
v0.13.0
v0.12.0
v0.12.0-alpha.1
v0.11.0
v0.11.0-alpha.1
v0.10.3
v0.10.2
v0.10.1
v0.10.0
v0.9.1
v0.9.0
v0.9.0-rc.3
v0.9.0-rc.2
v0.9.0-rc.1
v0.8.5
v0.8.4
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.8.0-rc.4
v0.8.0-rc.3
v0.8.0-rc.2
v0.8.0-rc.1
v0.7.0
v0.7.0-rc.2
v0.7.0-rc.1
v0.6.0
v0.6.0-rc.2
v0.6.0-rc.1
v0.5.1
v0.5.0
v0.4.0
v0.3.5
v0.3.4
v0.3.3
v0.3.2
v0.3.1
v0.3.0
v0.2.7
v0.2.6
v0.2.5
v0.2.4
Labels
Clear labels
dictionary
duplicate
fixed
0.11.0

Archived

fixed
0.13.0
refactoring

Archived

rewrite in rust
Might be fixed by the rust rewrite
thirdparty
arch
aarch64
系統架構是 Aarch64
arch
x86_64
系統架構是 x86_64
cannot reproduce
無法重現問題 Cannot reproduce the issue
contribution welcome
歡迎來幫忙 Contributions are very welcome, get started here
duplicate
重複的問題回報 This issue or pull request already exists
good first issue
適合新手 Interested in contributing? Get started here.
help wanted
需要高手相助 Need some help
invalid
回報的問題無效 Something is wrong
kind
bug
有東西不正常運作 Something is not working
kind
doc
加強文件說明 Enhance documentation
kind
enhancement
新功能 New feature
kind
mega issue
同一個問題回報中包含多個問題 Multiple issues reported
kind
question
只是問問題 Asking a question
needinfo
需要更多資訊 More information is needed
os
apple
作業系統是 MacOS 或 iOS
os
linux
作業系統是 GNU Linux
os
windows
作業系統是 Windows
to be determined
還未被說服有需求 Can't decide whether this is needed
upstream
跟上游軟體相關 Related to an upstream repository, already reported there
wontfix
我們決定不處理 Won't be fixed
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
chewing/libchewing#776
Reference in a new issue
chewing/libchewing
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?