Skip to content

部份繁體字不能轉換至簡體字 #60

@smlam

Description

@smlam

當使用 ZhConverterUtil.toSimple 轉換 兩餸飯 作簡體.
回傳的結果是
字不能轉換至 𩠌.

追查一下 code.
發現 com.github.houbb.opencc4j.support.convert.core.impl.DefaultUnitConvert 中的 getPhraseResult function.
用了 result.length() == 1 檢查.
𩠌 字 result.length() 是 2 導致.

if(result.length() == 1) {
                stringBuilder.append(result);
            } else {
                //fixed34: 如果映射缺失,则返回本身
                stringBuilder.append(charStr);
            }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions