473,410 Members | 1,857 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,410 software developers and data experts.

i am reading an xml, wiht XMLch [] , but when characters above ascii reached then thi

how to read UTF-8 characters from a xml file in c++, not using XMLCh type?
Nov 27 '12 #1
1 1654
weaknessforcats
9,208 Expert Mod 8TB
UTF-8 does not mean you have a character that can fit in a char. UTF-8 is a Unicode encoding. The Unicode characters are 16-bit or wider and in C++ you can use wchar_t for the ones up to 16 bits. A wchar_t character is called a wide char.

The C++ library has functions for these wide characters, like wcout, wcin, wstring, etc.

However, being able to read the bit pattern does not mean you can display the Unicode glyph. You will need language localization functions for this.
Nov 27 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Curt Fluegel | last post by:
I seem to be having a problem base64 encoding characters above 127. I can encode a sentence like "The big bad dog" without problems, but if I try to encode something like 0xFF I get different...
3
by: pabelard | last post by:
I am reading from a file and trying to find out if it has characters above ASCII 127 in it. My sample file does have several of these characters. However, the streamreader seems to skip over...
2
by: Phil Galey | last post by:
I have huge image files, from which I need to read only the first 20,000 characters, looking for a particular substring. The closest I've come to being able to do that is with the StreamReader. ...
1
by: chinthamani | last post by:
Hai I want to open a file and read when the same file is already opened for writing. I need to do the reading process simultaniously when the file is being writen. Regards. S.Vinodh Noel...
1
by: ronrsr | last post by:
I have an MySQL database called zingers. The structure is: zid - integer, key, autoincrement keyword - varchar citation - text quotation - text I am having trouble storing text, as typed in...
1
by: JanaB | last post by:
I am writing a code that needs to read in a binary file. At the moment I don't have to do anything with the data, I just need to view the contents to compare its structure with another binary file....
2
by: enginious | last post by:
Hi, I'm not sure if I'm barking up the wrong tree or not, but I gather that there could be potential security flaws by allowing unicode text to form part of an SQL query. Currently to prevent...
3
by: Abhishek Bhatt | last post by:
I am using MSAccess form. There is a text box. If I type ALT+181 in the textbox the character dispalyed is ╡. But when I do the text.value it shows the character |. Any character above 175 ASCII...
4
hsriat
by: hsriat | last post by:
If I need to encode characters below ASCII value 32, I can use this:$text = filter_var($text, FILTER_UNSAFE_RAW, FILTER_FLAG_ENCODE_LOW); How can I encode characters above ASCII value 256?
2
by: Andrea Robinson | last post by:
I need to convert data that is input from a file from ASCII chars to Ints, but the catch is no atoi and I can ONLY convert number characters and ignore the others, and the # symbol has to act like a...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.