Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

making a non-english dictionary in C??

Status
Not open for further replies.

palhello

Programmer
Dec 29, 2002
30
NP
I am trying to make a non-english version of a dictionary in C..but I am confused in even thinking what should I use to implement all those font of my language say(hindi) and a connection with database with the font of my language....
are there some libraries available??
 
Well the way you represent all those characters is by using say Unicode

> are there some libraries available??
Probably - but it depends on say
Your Operating System - does it support unicode?
Your compiler,
Your chosen database

A dictionary is little more than
[tt] definition = dictionary[word];[/tt]
The database just helps you manage what is in effect a large, permanent array. How you choose to index that array, and what the answer you get back is is really up to you to specify.

--
 
Ok I have searched for some unicode fonts that are available but I still am confused about using it in the windows 98 or dos platform. Are there any good tutorials around for the implementation of unicode.????
 
1) Include _UNICODE in your list of defines
Project/Settings/CC++/General/Preprocessor Definitons. This is on VC6. VS.net it is under Properties.
2) #include <tchar.h> in your code

3) Make sure you use the unicode equivalents of any character routines eg

strlen becomes _tcslen
strcpy becomes _tcscpy
sprintf becomes _stprintf
Have a look in tchar.h if you are not sure
4) Declare all chars as TCHAR. Note that this does not apply to items that are 8-bits only like GUIDs and IP addresses, sockets etc.

5) Surround strings with _T(). eg "fred" becomes _T("fred")

And that's it.
 
but I totally want to make a dos based program because I don't know much of windows programming..how to include unicode in dos.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top