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

绿,女转错了 #34

Open
cchil opened this issue Aug 5, 2020 · 2 comments
Open

绿,女转错了 #34

cchil opened this issue Aug 5, 2020 · 2 comments

Comments

@cchil
Copy link

cchil commented Aug 5, 2020

绿转成了lu,女转成了nu

@fengxxc
Copy link

fengxxc commented Aug 31, 2020

HanyuPinyinOutputFormat fmt = new HanyuPinyinOutputFormat();
fmt.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
fmt.setCaseType(HanyuPinyinCaseType.LOWERCASE);
fmt.setVCharType(HanyuPinyinVCharType.WITH_V); // ←注意这里
String pinyin_lv = PinyinHelper.toHanYuPinyinString("绿", fmt, "", false);
System.out.println(pinyin_lv);
String pinyin_nv = PinyinHelper.toHanYuPinyinString("女", fmt, "", false);
 System.out.println(pinyin_nv);

输出:

lv
nv

若:

fmt.setVCharType(HanyuPinyinVCharType.WITH_U_UNICODE);

则输出:

lü
nü

@cchil
Copy link
Author

cchil commented Sep 1, 2020

好的,谢谢您的回复。

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

2 participants