Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old January 4th, 2007, 07:25 AM
tchengwee@gmail.com
Guest
 
Posts: n/a
Default 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

  #2  
Old January 4th, 2007, 12:15 PM
flagos
Guest
 
Posts: n/a
Default Re: Convert unicode to codepoint

Is there any function in visual c++ 6 to do the conversion from unicode
Quote:
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?

  #3  
Old January 5th, 2007, 03:55 AM
=?iso-8859-1?q?Kirit_S=E6lensminde?=
Guest
 
Posts: n/a
Default Re: Convert unicode to codepoint


flagos wrote:
Quote:
Quote:
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

 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles