Re: get unicode values from string
Jyotirmoy Saikia <[email protected]> Fri, 6 May 2005 10:43:30 +0530
| Newsgroups | gmane.user-groups.linux.delhi.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I don't know much about Java; but I can answer your query for C. It may be helpful to you. > I have a file that has some text written in hindi. I need to > get the unicode codes of each character so that it can be used in the > Java Regular Expression API. I can't use the string as such in the > regular expression pattern. What is the character encoding of the file? I believe it is UTF-8, that is, the characters are stored in multi-byte format. C provides lots of functions like mblen, mbtowc, mbstowcs etc to convert the UTF-8 to wide charcater. All these functions are defined in stdlib.h But these functions are LOCALE sensitive. You should have proper LOCALE file for Hindi in /usr/share/locale or /usr/lib/locale. These stdlib functions are dependent on LC_CTYPE of LOCALE. Jyotirmoy Jyotirmoy On 5/6/05, R.Vijayaraghavan <[email protected]> wrote: > Hello, > > I have a file that has some text written in hindi. I need to > get the unicode codes of each character so that it can be used in the > Java Regular Expression API. I can't use the string as such in the > regular expression pattern. > > For example, the hindi word 'se' has the values - \u0938\u0947 > > regards, > vijay. > > _______________________________________________ > The ILUGD-Dev mailing list > Ilugd-dev-cunTk1MwBs8/[email protected] > > Subscribe/Unsubscribe/Suspend your list membership at: > http://frodo.hserus.net/mailman/listinfo/ilugd-dev >