[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unicode Help
- To: Development Discussions <developer at arabeyes dot org>
- Subject: Re: Unicode Help
- From: Gregg Reynolds <gar at arabink dot com>
- Date: Mon, 29 Aug 2005 14:54:02 -0500
- Cc: zeeallana at hotmail dot com
- User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)
zeeshan aslam wrote:
Hello
I am a student of BCS, right now confused at a point of the programming
of C & C++.
My objective is: To copy the arabic text data (each character one by
one ) written in one text file (MS Office Word) example Read.doc to
the another text file (MS Office Word) example Write.doc
First off, study the Unicode book at http://www.unicode.org. Especially
pay attention to the difference between characters and bytes. Your
program copies bytes, not characters. Or rather, its a mix: you open
your files in binary mode, but you use "getc" and "putc", which operate
on characters. Different compilers might behave differently, since it
depends on how you define "character". It also depends on what
operating system you're on. It gets rather complicated.
I recommend taking a look at the GNU C library docs:
http://www.gnu.org/software/libc/manual/html_node/I_002fO-Overview.html#I_002fO-Overview
also:
http://www.gnu.org/software/libc/manual/html_node/Character-Input.html#Character-Input
and
http://www.gnu.org/software/libc/manual/html_node/Binary-Streams.html#Binary-Streams
If you're going to program at a low level you need to know all that stuff.
If you plan on becoming a real programmer, start learning emacs (my fav)
or vi (lots of others like it).
Hope that helps.