Convert unicode to codepoint



 DEVELOP > c-Plus-Plus > Convert unicode to codepoint

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1

1

 
Topic: DEVELOP > c-Plus-Plus
User: ""
Date: 04 Jan 2007 01:19:54 AM
Object: Convert unicode to codepoint
Is there any function in visual c++ 6 to do the conversion from unicode
to codepoint? In vb, ascw can be used to do that.Thanks
.

User: "flagos"

Title: Re: Convert unicode to codepoint 04 Jan 2007 06:07:10 AM

Is there any function in visual c++ 6 to do the conversion from unicode
to codepoint? In vb, ascw can be used to do that.Thanks

wchar_t * uni_buffer=L"Hello!";
wchar_t uni_character = uni_buffer[0];
wchar_t uni_character_2 = uni_buffer[1];
Is this what you need?
.
User: "=?iso-8859-1?q?Kirit_S=E6lensminde?="

Title: Re: Convert unicode to codepoint 04 Jan 2007 09:51:10 PM
flagos wrote:

Is there any function in visual c++ 6 to do the conversion from unicode
to codepoint? In vb, ascw can be used to do that.Thanks


wchar_t * uni_buffer=L"Hello!";

wchar_t uni_character = uni_buffer[0];
wchar_t uni_character_2 = uni_buffer[1];


Is this what you need?

I think this only works if your wchar_t type is 32 bit. If it is 16 bit
then you will need to look out for surrogate pairs. As it looks like
he's using Windows wchar_t will be 16 bit.
I presume the OP wants something that converts to the "code page"
rather than "code point". There are some Windows API calls to do this
and some multibyte to wide character calls in the library too, all off
topic for here. Try Microsoft's VC group (don't remember the name, but
you'll find it on Google Groups without too much difficulty).
K
.



  Page 1 of 1

1

 


Related Articles
 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER