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

Convert does not work on lü, nü, lüe #2

Open
daddehs1 opened this issue Feb 27, 2019 · 0 comments
Open

Convert does not work on lü, nü, lüe #2

daddehs1 opened this issue Feb 27, 2019 · 0 comments

Comments

@daddehs1
Copy link

Expected Behavior

On converting hanzi such as 绿, 女, or 略, the expected outputs would be:

['ㄌㄩˋ']
[ ['ㄋㄩˇ', 'ㄖㄨˇ' ] ]
['ㄌㄩㄝˋ']

Current Behavior

Current outputs for 绿, 女, or 略 are, respectively:

[ 'undefined`' ]
[ [ 'undefinedˇ', 'ㄖㄨˇ' ] ]
[ 'undefined`' ]

Notes:

  1. 女 has a secondary pronunciation (pinyin: ru3, zhuyin: ㄖㄨˇ) which behaves as expected
    The issue only occurs on the primary pronunciation which contains (pinyin: ü, zhuyin:ㄩ)

  2. The issue does not occur when converting hanzi which contain (pinyin: ü, zhuyin:ㄩ) that do not also contain (pinyin: r, zhuyin:ㄖ) or (pinyin: n, zhuyin:ㄋ)
    e.g. converting 与, 月, 元, 需, 学, 选, 句, 觉, 卷, 去, 却, 全 functions as expected.
    This may suggest that the issue lies with the pinyin character "ü", as the list of characters above are all written with a "u" in pinyin although the pronunciation is in actuality "ü"

Steps to Reproduce

  1. install node package hanzi-to-zhuyin
  2. execute the following code:
const convert = require('hanzi-to-zhuyin');
convert("绿").then(console.log)
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

1 participant