473,406 Members | 2,633 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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

Jan 4 '07 #1
2 2372
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?

Jan 4 '07 #2

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

Jan 5 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Michael Weir | last post by:
I'm sure this is a very simple thing to do, once you know how to do it, but I am having no fun at all trying to write utf-8 strings to a unicode file. Does anyone have a couple of lines of code...
3
by: Supratim | last post by:
Hi, For past few weeks I am working on a function that would take encoded Unicode characters from query string of http requests and then decode them back to Unicode numbers. I have full success...
10
by: Dan | last post by:
Hi all, I'd like to submit what it seems to be a bug as for the Unicode compliance of methods like Char.Is...: as stated by the latest version of Unicode, codes +03F2 and +03F9 represent Greek...
12
by: damjan | last post by:
This may look like a silly question to someone, but the more I try to understand Unicode the more lost I feel. To say that I am not a beginner C++ programmer, only had no need to delve into...
0
by: kunjee | last post by:
Hi All, I have built a win32 coonsole application. It works fine with _MBCS/MBCS settings.. On changing it to unicode, i face the following problem. If it is Unicode, then i use _setmode to...
6
by: Aneesh E Warrier | last post by:
How can I convert Unicode Codepoint (dec) value to ASCII char? For example: 49324 is 사 a Korean alphabet, and I want to convert it to ASCII letter. Thanks!
17
by: Adam Olsen | last post by:
As was seen in another thread, there's a great deal of confusion with regard to surrogates. Most programmers assume Python's unicode type exposes only complete characters. Even CPython's own...
2
by: =?Utf-8?B?anVsaW8=?= | last post by:
How do I display a Unicode character? I tried TextBox1.Text = new string('\u266D',1); and also char c = '\u266D'; TextBox1.Text = c.ToString(); Neither works (it should display a...
10
by: himanshu.garg | last post by:
Hi, The following std c++ program does not output the unicode character.:- %./a.out en_US.UTF-8 Infinity:
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.