Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ C MFC
Please suggest on below issue.
I have unicode MFC application.
If CString contains any japanese text then i need not to show on title of the window.
How can i recongnize is this string contains japanese character ?
CString s = _T(" 春日井 隆夫");
Posted 25-Feb-13 17:47pm
Mr Sam692
Sergey Alexandrovich Kryukov at 26-Feb-13 0:51am
I don't know if you are from Japan or not, but if you are, you should know better... :-)

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

I don't know the language, but I know a bit about Japanese writing systems. There is no a general "Japanese" Unicode subset, but there are separate Unicode subsets for Hiragana, Katakana, Kana and their variants (supplements, extensions and half-width forms). Please see:[^],[^],[^],[^].
Using these articles (especially from, Wikipedia for general information), recognize the Unicode subset in the form of code point ranges, put this data in your code and write then your method(s) bases on this data. It's quite simple.
I would suggest to wrote not a Boolean function (Japanese or not), but instead, a function returning some classifier showing what Japanese writing system a given character belongs to. Introduce an enumeration type to describe it.
Mr Sam at 26-Feb-13 7:35am
Thank you! SA.
Sergey Alexandrovich Kryukov at 26-Feb-13 11:56am
You are very welcome.
Good luck, call again.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 531
1 OriginalGriff 334
2 DamithSL 235
3 Maciej Los 170
4 Bruno Sprecher 130
0 DamithSL 95
1 OriginalGriff 65
2 Gopu Raj 30
3 Mahsa Hassankashi 25
4 Raul Iloc 25

Advertise | Privacy | Mobile
Web03 | 2.8.141030.1 | Last Updated 26 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100