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

stringByTransliteratingJapaneseToRomajiWithWordSeperator method is not working well. #3

Open
VuongThanhNguyen opened this issue Aug 10, 2016 · 0 comments

Comments

@VuongThanhNguyen
Copy link

Dear Mr Steven Grace

I am a fresher with Object-C and I would like to make an application that it can convert between romaji, kanji, katakana, hiragana. I had searched and found out sample source code that it meet with my demand at https://github.com/00StevenG/NSString-Japanese link.
I has downloaded source code from this link and run it in Xcode. The application has run normally but functions convert between romaji, hiragana, katakana and kanji are not working. When I executed debug, I has recognized that the source code as below always return only value is kCFStringTokenizerTokenNone.
// create a tokenizer to enumerate by WORD
CFStringTokenizerRef tok = CFStringTokenizerCreate(NULL,
(CFStringRef)self,
CFRangeMake(0,self.length),
kCFStringTokenizerUnitWord,
CFLocaleCreate(kCFAllocatorDefault, CFSTR("Japanese")));
// goto the first token in the string
CFStringTokenizerTokenType result =CFStringTokenizerAdvanceToNextToken(tok);
So that code below is never executed and can not convert romaji, hiragana, katakana, kanji.
while(result !=kCFStringTokenizerTokenNone){
...
}
Below is the text that I used as parameter to pass into your app
"映画作品"
Could you please point out or give me any hints to cope with this problem.

Best regards,
Vuong Nguyen

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