|
|
Windows functions with character arguments, currently are each in 2 modes, one for 1-byte characters (the old ascii characters from 0 to 255), and one for 2-byte characters (WCHAR etc) for the Unicode characters from 0 to 65535 (0x0000 to 0xFFFF). But there are Unicode characters defined that need to be in 3 bytes, e.g. 0x012000 to 0x01236E for cuneiform; I have already found a Wikipedia page that displays cuneiform characters, or would if I had a font for cuneiform. How do Windows C++ programs usually handle and read and write such exotica?
Wikipedia page for "Cuneiform"
|
|
|
|
|
Those characters fall into the Multi-byte Character Set (MBCS) types, and require fonts that can display them.
|
|
|
|
|
Are there any C++ functions to handle MBCS characters?
|
|
|
|
|
What specifically are you trying to do?
|
|
|
|
|
First you figure out what you want to do.
Second your figure out what character set or character sets (plural) you need to solve your problem.
Third you determine what technology you need to solve that problem.
At best you haven't identified the second part of the above. At least you haven't stated what character set you think you will be working with.
|
|
|
|
|
The printf function has a version that prints one-byte characters, and a version that prints two-byte characters. Similarly with many other Windows C++ functions. But if I want to print a cuneiform character to screen, that is a 3-byte Unicode character, am I advised to stick to one-character mode and myself make the byte sequence to make Unicode go into the mode for 3-byte characters, and then to send the 3-byte character as three one-byte characters?
|
|
|
|
|
Anthony Appleyard wrote: that is a 3-byte Unicode character
You are confusing the conceptual with the practical.
"Unicode" in its broadest sense is an attempt to regularize how characters are used in computing.
It does that by defining characters. Those characters are then represented in character sets. There are quite a few of those (although less than the number of sets without the standardization of unicode.)
Following are two examples of character sets.
http://en.wikipedia.org/wiki/UTF-8[^]
http://en.wikipedia.org/wiki/UTF-16[^]
And those are just what is supposed to be in the data and doesn't say anything about whether any given technology X will support them partially much less fully.
You seem to be suggesting that you might be attempting to use UTF16. However I am rather certain that there are variants of that.
|
|
|
|
|
jschell wrote: You seem to be suggesting that you might be attempting to use UTF16. However I am rather certain that there are variants of that.
I have successfully read and printed and displayed on screen the 2-byte Unicode characters, in a C++ application called Typecase which I wrote, which is somewhat like Windows Character Map; it outputs by putting its text output in the clipboard. I have successfully output Unicode text to UTF16 mode files.
|
|
|
|
|
As I stated there are variants to UTF16. I am rather certain that one does not have any extensions at all. Another uses a two bytes (a range of two bytes) to specify that the following two bytes are used together (4 bytes) to create a code point.
I believe there is a variant of UTF8 that can have a 3 byte character code point. But I am not as clear that there is a UTF16 that does.
|
|
|
|
|
You are confusing UTF-8 and UTF-16. Both use variable length representation for characters, though with UTF-16, common languages are represented with two bytes, with things like musical notes and cuneiform in the escaped range.
See the following: https://en.wikipedia.org/wiki/UTF-16[^]
|
|
|
|
|
Please can someone recommend a good book about Windows programming for people who know the C++ language? For the various functions and messages my main paper source, rather than online, currently is a book published in 1992 and a book published in 1993 in Windows 3.1 times. But many things have changed since.
|
|
|
|
|
|
|
Hi,
The book [Beginning Visual C++ 2012]
Ivor Horton's Beginning Visual C++ 2012:
•Introduces you to the current version of the C++ language (C++ 11), as it is implemented in Microsoft® Visual Studio® 2012
•Provides a comprehensive tutorial on using the complete Visual C++ programming language
•Explains the C++ Standard Template Library and how to apply it to make your programming tasks easier
•Shows you the principal elements of developing Windows desktop applications in C++ using the Microsoft Foundation Classes
•Guides you through the development of a substantial Windows® 7 desktop application that you can also run under Windows® 8
•Illustrates how to develop Windows 8 Apps with Visual C++ using a working game example
Not completely sure this book is what you are looking for but at least it provides information on STL and MFC and it's not expensive.
With friendly greetings,
Eric Goedhart
|
|
|
|
|
Sound card is capable of input/output the audio signals. Can it distinguish between the local voice (a music file on local drive) and a voice coming from network (skype call)? If yes, how can we implement it in C++?
This world is going to explode due to international politics, SOON.
|
|
|
|
|
This question is impossible to answer in a forum such as this. There are many packages available for sound processing, and Google will help you find examples.
|
|
|
|
|
IAudioClient::Initialize Method.
The function above has a parameter named REFERENCE_TIME hnsBufferDuration. Now this parameter is expressed in 100-nanosecond units. What does it mean? How does this definition fits the following initialization?
int hnsDuration = 10000000 * 15;
Thanks for any pointer.
|
|
|
|
|
The prefix nano is 10 to the power -9, or one billionth in common parlance. so 100 nano-somethings is 10 to the power -7, or one ten-millionth. Simply put, 100 nano-seconds is one tenth of a micro-second. So from the above, 10,000,000 100-nano-seconds is 1 second, multiplied by 15 is 15 seconds.
Fixed; well spotted Carlo.
|
|
|
|
|
5.
Richard MacCutchan wrote: 10,000,000 nano-seconds is 1 second 10,000,000 * 100 nano-seconds is 1 second.
Veni, vidi, vici.
|
|
|
|
|
Oh poo!
|
|
|
|
|
Hello Every Body
I am looking do the project on blocking the unwanted site or redirecting so that children can not access the particular site.
so will you people guide which way should i proceed...
|
|
|
|
|
|
Hello,
Thanks for reply.
I research it can be achieved by using winsock and LSP(Layered Service Provider) so i thing its comes under MFC and C++ so putted my question in MFC and C++..
Thanks
sarfaraz
|
|
|
|
|
Your question has nothing to do with C++. You only asked how to redirect some website to yourself.
|
|
|
|