![]() |
C++ and Unicode support
First of all - hello everybody :)
I am currently working on program that conjugates and words in various languages. Everything goes ok, but my problems started with diacritics (national letters). I am using CPP Builder 6.0 for designing window interface, but problems began also when programming command line program. Of course the problem concerns Unicode coding. I need some to way to read Unicode characters from file, then perform actions on them and finally, display. I must admit I am not hard-science mind, my experiences are quite modest in this field, as well as in programming in general. I have been looking for weeks for comprehensive sources for Unicode issue, but they provide only theoretical or complicated practical guides, which are beyond my understanding. What I would like to ask you, Great Community: can you explain me in very easy way (example would be nicely seen) how to deal with the problem? I mean a several-line program that reads various characters and displays them? Telling me to use libiconv or stdstring etc. woulb be a total abstraction for me. Any help would be greatly appreciated :) Thanks in forward :) PS. Since there are various Unicode formats: I need to use only latin-extended, cyrylic and greek alphabets, all in left-to-right format. |
Re: C++ and Unicode support
>can you explain me in very easy way (example would
>be nicely seen) how to deal with the problem? Given your restrictions, you can do this relatively easily depending on what you mean by "then perform actions on them". Here's a simple program that reads a Windows file with the default Unicode encoding (UTF-16 little endian) and copies it character by character. Provided your standard library correctly converts between UTF-16LE and C++ wide characters, you're good: :
However, don't waste your time with the console. The Windows console is notoriously bad at correctly handling Unicode characters, even if you use the Lucida Console font. You'll just spend countless hours trying to troubleshoot code that works perfectly with a suitable display application. |
Re: C++ and Unicode support
Quote:
But I would like to ask about one more small thing. I am coding in CPP Builder 6.0 and I cannot make buttons with certain characters, as well as fill text fields or generally paste them into code. Is there an external program I shall use to "update" my sourcecode? |
Re: C++ and Unicode support
>>It's a pity Notepad++ does not support it
It probably does if you have the language(s) installed on your computer. >>I am coding in CPP Builder 6.0 Why don't you get a newer compiler that allows you to do that ? |
Re: C++ and Unicode support
I thought is is the newest version of BCB. Is whole Borland CPP Builder out of date? So which one do you recommend? :)
|
Re: C++ and Unicode support
I don't use it myself, but here's the Link
|
Re: C++ and Unicode support
Quote:
|
Re: C++ and Unicode support
>I cannot afford BCB 2007.
Try something free and modern then. |
Re: C++ and Unicode support
Ok thaks, I will try then :)
|
Re: C++ and Unicode support
There are at least two other free modern compilers too, like Dev-C++ and VC++ 2008 Express
|
| All times are GMT -5. The time now is 4:22 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC