I've got some code where somebody cut&pasted some comments from MS Word,
and so these comments have "smart quotes" (in particular apostrophes)
embedded.
The apostrophe is character hex 0x92.
2.1 indicates that characters not in the source character set are
converted to the universal character name that designates the character.
So far, so good. The non-source character gets translated. No big deal.
But then we have 2.2/2. "If the value for a universal character name is
less than 0x20 or in the range 0x7f-0x9f (inclusive), or if the
universal character name designates a character in the basic source
character set, then the program is ill-formed."
So would this character of 0x92 in a comment cause the entire program to
be ill-formed? Or is it OK because it's in a comment? 3 3196
* red floyd: I've got some code where somebody cut&pasted some comments from MS Word, and so these comments have "smart quotes" (in particular apostrophes) embedded.
The apostrophe is character hex 0x92.
2.1 indicates that characters not in the source character set are converted to the universal character name that designates the character.
So far, so good. The non-source character gets translated. No big deal.
But then we have 2.2/2. "If the value for a universal character name is less than 0x20 or in the range 0x7f-0x9f (inclusive), or if the universal character name designates a character in the basic source character set, then the program is ill-formed."
So would this character of 0x92 in a comment cause the entire program to be ill-formed? Or is it OK because it's in a comment?
Check out whether that 0x92 is really Unicode or just some local
character set; the universal character name is Unicode.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
red floyd wrote: I've got some code where somebody cut&pasted some comments from MS Word, and so these comments have "smart quotes" (in particular apostrophes) embedded.
The apostrophe is character hex 0x92.
AFAIK, apostrophe is an ASCII character (and thus, in range [0x0, 0x7F]
).
It is the character 39 (decimal) which is also character 0x27
Actually, it is a character of the basic source character set... It is
used for character literals.
SuperKoko wrote: red floyd wrote: I've got some code where somebody cut&pasted some comments from MS Word, and so these comments have "smart quotes" (in particular apostrophes) embedded.
The apostrophe is character hex 0x92. AFAIK, apostrophe is an ASCII character (and thus, in range [0x0, 0x7F] ). It is the character 39 (decimal) which is also character 0x27
Actually, it is a character of the basic source character set... It is used for character literals.
Excuse me, I was confusing apostrophe and single quote.
In that case, the program should be ill-formed. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Martin Goldman |
last post by:
Hello all,
I've been struggling for a few days with the question of how to convert
"smart" (curly) quotes into straight quotes. I tried playing with the
htmlentities() function, but all that is...
|
by: David B. Held |
last post by:
I wanted to post this proposal on c.l.c++.m, but my news
server apparently does not support that group any more.
I propose a new class of exception safety known as the
"smart guarantee". ...
|
by: Michael Olea |
last post by:
Here is a design problem I ran into this am - and I have cleaned the
bathroom,
scrubbed toilet sink and tub, windexed all glass, mopped the floor, and
vacuumed the house - no dice, the problem is...
|
by: Ron |
last post by:
Hello, I'm having an aggravating time getting the "html" spewed by Word
2003 to display correctly in a webpage.
The situation here is that the people creating the documents only know
Word, and...
|
by: gar |
last post by:
Hi,
I need to replace all the double quotes (") in a textbox with single quotes ('). I used this code
text= Replace(text, """", "'"
This works fine (for normal double quotes).The problem...
| |
by: BobAchgill |
last post by:
Is there a way to let the User click on a button on a web
site and have that download and install my prepackaged
compressed data directory and place it nicely under my
existing VB .Net Form...
|
by: forest demon |
last post by:
what i want is a snippet of an XML comment, that when inserted above a
method, will pickup stuff like the return value, etc.
by default, a /// will supply method parameters, but not much else.
...
|
by: Noozer |
last post by:
I'm looking for a "smart folder" program to run on my Windows XP machine.
I'm not having any luck finding it and think the logic behind the program is
pretty simple, but I'm not sure how I'd...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
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...
|
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...
|
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: 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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |