Discussion:
How to input a Euro symbol?
(too old to reply)
Norman Diamond
2006-11-20 07:16:53 UTC
Permalink
I used Notepad to open .rc and .rc2 files and save them as Unicode. Visual
Studio 2005 understands Unicode resource files.

The reason for doing so is that I need to insert some characters which don't
exist in Shift-JIS, in order to compile DLLs for foreign language versions.

One character that I need to insert is the Euro symbol.

In Windows XP SP2 Pro, I tried Start - Accessories - System Tools -
Character Code Chart. This chart includes a character that looks roughly
like CE, and the tooltip calls it "Euro-Currency Sign", but it doesn't look
like the modern Euro symbol. Also the codepoint for this character is
U+20A0 not U+20AC.

If I type 20AC into the edit box for "specify in Unicode(U)" then the chart
moves to a character that looks roughly like o/c, the tooltip calls it
"Account Of", it doesn't look like a Euro symbol, and the codepoint is
U+2100 not U+20AC.

Going back to 20A0 and advancing from there, the Character Code Chart
provides these possibilities for input into an .rc file:
U+20A0 Euro-Currency Sign (incorrect, maybe obsolete?)
U+20A1 Colon Sign (some country's currency was called Colon)
U+20A2 Cruzeiro Sign (obsolete Brazilian currency)
U+20A3 French Franc Sign (wow Unicode likes obsolete characters)
U+20A4 Lira Sign (looks to me like Pound Sign but I understand Italy and
Libra)
U+20A5 Mill Sign (United States?)
U+20A6 Naira Sign (I vaguely recall that word)
U+20A7 Peseta Sign (looks to me like plural Pesetas sign)
U+20A8 Rupee Sign (looks to me like plural Rupees sign)
U+20A9 Won Sign (Korea)
U+20AA New Sheqel Sign (yeah Israel did call it new)
U+2100 Account Of

How can I get U+20AC into an .rc file?
Mihai N.
2006-11-20 07:40:51 UTC
Permalink
Post by Norman Diamond
One character that I need to insert is the Euro symbol.
...
Post by Norman Diamond
Going back to 20A0 and advancing from there, the Character Code Chart
U+20A0 Euro-Currency Sign (incorrect, maybe obsolete?)
U+20A1 Colon Sign (some country's currency was called Colon)
U+20A2 Cruzeiro Sign (obsolete Brazilian currency)
U+20A3 French Franc Sign (wow Unicode likes obsolete characters)
U+20A4 Lira Sign (looks to me like Pound Sign but I understand Italy and
Libra)
U+20A5 Mill Sign (United States?)
U+20A6 Naira Sign (I vaguely recall that word)
U+20A7 Peseta Sign (looks to me like plural Pesetas sign)
U+20A8 Rupee Sign (looks to me like plural Rupees sign)
U+20A9 Won Sign (Korea)
U+20AA New Sheqel Sign (yeah Israel did call it new)
U+2100 Account Of
How can I get U+20AC into an .rc file?
20A0 is indeed obsolete, 20AC is the real thing.
The problem is that 20AC is missing from the Japanese MS fonts
(MS Gothic, MS Mincho, etc.)

You can try changing the font in Character Map to something that has 20AC
(like Arial Unicode MS), and take it from there.
Or you can start WordPad, type 20AC, then Alt-X, the copy paste the thing in
Notepad.

Although 20AC is not present in the Japanese fonts, the fallback will take
care of it.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Norman Diamond
2006-11-20 08:25:43 UTC
Permalink
"Mihai N." <***@yahoo.com> wrote in message news:***@207.46.248.16...
[Norman Diamond:]
Post by Norman Diamond
One character that I need to insert is the Euro symbol.
How can I get U+20AC into an .rc file?
20A0 is indeed obsolete, 20AC is the real thing. The problem is that 20AC
is missing from the Japanese MS fonts (MS Gothic, MS Mincho, etc.) You
can try changing the font in Character Map to something that has 20AC
(like Arial Unicode MS), and take it from there.
You are right. Actually the Character Map already includes a bunch of
characters that MS Gothic doesn't have. You can tell because Character Map
displays them using ugly fonts that scaled really really badly, while
characters that exist in MS Gothic are displayed properly using the TrueType
font MS Gothic. But you are right that changing the selected font to Arial
Unicode MS added more of these characters and the Euro is among them.
Or you can start WordPad, type 20AC, then Alt-X,
Again you are right.
the copy paste the thing in Notepad. Although 20AC is not present in the
Japanese fonts, the fallback will take care of it.
Sorry, you're wrong this time. The result of copying and pasting into
Notepad is a solid black rectangle. Notepad doesn't say if the codepoint
pasted properly or not. Font fallback does not take care of it.[*]

The important thing though is that copying and pasting into Visual Studio
2005 works. Thank you.

[* Or at least Windows XP SP2's default font fallbacks don't take care of
it. I haven't tried changing the defaults in Windows XP, though I did in
Windows CE for a few devices.]
Mihai N.
2006-11-20 18:45:17 UTC
Permalink
Post by Norman Diamond
Sorry, you're wrong this time. The result of copying and pasting into
Notepad is a solid black rectangle. Notepad doesn't say if the codepoint
pasted properly or not. Font fallback does not take care of it.[*]
...
Post by Norman Diamond
[* Or at least Windows XP SP2's default font fallbacks don't take care of
it. I haven't tried changing the defaults in Windows XP, though I did in
Windows CE for a few devices.]
Also on Win XP SP2, but English, the it works.

I don't say you are wrong, only that it is a pain to determine what works
where.

But I cannot install a localized OS to test every answer I post :-)
(ok, I have a Japanese XP in VMWare, and a 2000 US in a separate partition,
for testing, but sometimes I am too lazy to boot :-)
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Serge Wautier
2006-11-20 08:34:04 UTC
Permalink
And if you really want an overkill solution, you can install one of the many
Western European keyboards that contain that character. Such as the Belgian
French: The € sign is Ctrl+Alt+E ;-)

Serge
http://www.apptranslator.com
Post by Mihai N.
Post by Norman Diamond
One character that I need to insert is the Euro symbol.
...
Post by Norman Diamond
Going back to 20A0 and advancing from there, the Character Code Chart
U+20A0 Euro-Currency Sign (incorrect, maybe obsolete?)
U+20A1 Colon Sign (some country's currency was called Colon)
U+20A2 Cruzeiro Sign (obsolete Brazilian currency)
U+20A3 French Franc Sign (wow Unicode likes obsolete characters)
U+20A4 Lira Sign (looks to me like Pound Sign but I understand Italy and
Libra)
U+20A5 Mill Sign (United States?)
U+20A6 Naira Sign (I vaguely recall that word)
U+20A7 Peseta Sign (looks to me like plural Pesetas sign)
U+20A8 Rupee Sign (looks to me like plural Rupees sign)
U+20A9 Won Sign (Korea)
U+20AA New Sheqel Sign (yeah Israel did call it new)
U+2100 Account Of
How can I get U+20AC into an .rc file?
20A0 is indeed obsolete, 20AC is the real thing.
The problem is that 20AC is missing from the Japanese MS fonts
(MS Gothic, MS Mincho, etc.)
You can try changing the font in Character Map to something that has 20AC
(like Arial Unicode MS), and take it from there.
Or you can start WordPad, type 20AC, then Alt-X, the copy paste the thing in
Notepad.
Although 20AC is not present in the Japanese fonts, the fallback will take
care of it.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Norman Diamond
2006-11-20 08:52:00 UTC
Permalink
Post by Serge Wautier
And if you really want an overkill solution, you can install one of the
many Western European keyboards that contain that character. Such as the
Belgian French: The � sign is Ctrl+Alt+E ;-)
But it doesn't help me if a central dot is Ctrl+Alt+E.

I tried copying your central dot into Visual Studio 2005 to see if the
codepoint might result in a different visible character, but it pasted as a
blank space. In Wordpad it pasted as a central dot.
Norman Diamond
2006-11-20 09:05:41 UTC
Permalink
Post by Serge Wautier
And if you really want an overkill solution, you can install one of the
many Western European keyboards that contain that character. Such as the
Belgian French: The � sign is Ctrl+Alt+E ;-)
I tried looking at the message source of your posting in order to see if
there might be a hint about the encoding of your central dot. Where Outlook
Express shows your message as a message it shows a central dot, but in
properties - message source it shows a hollow rectangle instead.

Copying and pasting the hollow rectangle to GVim reveals the codepoint as
0x80.

Where Outlook Express is showing message source, the font is normal MS
Gothic before the hollow rectangle but changes Courier. MS Gothic doesn't
get font smoothing but Courier does. Yet another Outlook Express oddity.
Fortunately it's just an oddity not a serious bug. Screenshot:
Loading Image...
Serge Wautier
2006-11-20 09:17:08 UTC
Permalink
Ouch! I've been using a fresh Windows installation lately and forgot to set
OE's codepage to UTF-8 :-( (I use it for usenet only).
The Euro sign (? - hopes it displays correctly this time) is indeed 0x80 in
Latin-1 (OE's default codepage on my machine).

Serge
http://www.apptranslator.com
Post by Norman Diamond
Post by Serge Wautier
And if you really want an overkill solution, you can install one of the
many Western European keyboards that contain that character. Such as the
Belgian French: The € sign is Ctrl+Alt+E ;-)
I tried looking at the message source of your posting in order to see if
there might be a hint about the encoding of your central dot. Where Outlook
Express shows your message as a message it shows a central dot, but in
properties - message source it shows a hollow rectangle instead.
Copying and pasting the hollow rectangle to GVim reveals the codepoint as
0x80.
Where Outlook Express is showing message source, the font is normal MS
Gothic before the hollow rectangle but changes Courier. MS Gothic doesn't
get font smoothing but Courier does. Yet another Outlook Express oddity.
http://www.geocities.jp/hitotsubishi/message_source.png
Norman Diamond
2006-11-20 09:32:30 UTC
Permalink
Post by Serge Wautier
Ouch! I've been using a fresh Windows installation lately and forgot to
set OE's codepage to UTF-8 :-( (I use it for usenet only).
The Euro sign (? - hopes it displays correctly this time) is indeed 0x80
in Latin-1 (OE's default codepage on my machine).
Sorry, the third line starts out with The Euro sign (question mark dash
hopes it displays ....

The message source displays the question mark as a question mark. The
headers say that the encoding is the reader's default encoding, and they
don't say what the sender's encoding might have been.

The question mark can be copied and pasted into GVim, and GVim says the
codepoint is 0x3F. Yes that's a single-byte hankaku question mark in
Shift-JIS.
Norman Diamond
2006-11-22 00:42:30 UTC
Permalink
Post by Serge Wautier
The Euro sign (? - hopes it displays correctly this time) is indeed 0x80
in Latin-1 (OE's default codepage on my machine).
Thank you for explaining the codepoint but the character set needs a
correction.

In Latin-1 (ISO-8859-1) there is no Euro sign.

In Latin-9 (ISO-8859-15) the Euro sign replaces a rarely used generic
currency sign and the codepoint is not 0x80.

In one Microsoft character set the Euro sign and some other displayable
graphic characters replace some control characters. In that character set
the Euro sign's codepoint is 0x80. Fortunately that character set is used
by Windows CE devices that will be marketed in Europe, and fortunately
Visual Studio 2005 translated the Euro sign the same way when compiling
resource files (at least for one target locale so far), so it is working.
Serge Wautier
2006-11-22 09:58:24 UTC
Permalink
By Latin 1, I indeed referred to MS codepage 1252
Thanks for the clarification.

Serge
http://www.apptranslator.com
Post by Norman Diamond
Post by Serge Wautier
The Euro sign (? - hopes it displays correctly this time) is indeed 0x80
in Latin-1 (OE's default codepage on my machine).
Thank you for explaining the codepoint but the character set needs a
correction.
In Latin-1 (ISO-8859-1) there is no Euro sign.
In Latin-9 (ISO-8859-15) the Euro sign replaces a rarely used generic
currency sign and the codepoint is not 0x80.
In one Microsoft character set the Euro sign and some other displayable
graphic characters replace some control characters. In that character set
the Euro sign's codepoint is 0x80. Fortunately that character set is used
by Windows CE devices that will be marketed in Europe, and fortunately
Visual Studio 2005 translated the Euro sign the same way when compiling
resource files (at least for one target locale so far), so it is working.
Tony Proctor
2006-11-23 12:27:17 UTC
Permalink
This area is a bit of a mire Norman. Many Windows registries seem to equate
"iso-8859-1" (and variations thereof) with "windows 1252". Just look under
HKEY_CLASSES_ROOT\Mime\Database\Codepage\1252. As you correctly point out,
the Euro symbol is in a different place in 8859-15 to code page 1252, and
not in 8859-1 at all. This has repercussions with things like XMLHTTP since
XML only understands ISO charset names, and not proprietary code pages

I saw an interesting thread on this same subject a while back:
http://groups.google.ie/group/microsoft.public.inetserver.asp.general/browse_frm/thread/89bef9c4666f94c1/9d5008cb1014a884?&hl=en#9d5008cb1014a884

Tony Proctor
Post by Norman Diamond
Post by Serge Wautier
The Euro sign (? - hopes it displays correctly this time) is indeed 0x80
in Latin-1 (OE's default codepage on my machine).
Thank you for explaining the codepoint but the character set needs a
correction.
In Latin-1 (ISO-8859-1) there is no Euro sign.
In Latin-9 (ISO-8859-15) the Euro sign replaces a rarely used generic
currency sign and the codepoint is not 0x80.
In one Microsoft character set the Euro sign and some other displayable
graphic characters replace some control characters. In that character set
the Euro sign's codepoint is 0x80. Fortunately that character set is used
by Windows CE devices that will be marketed in Europe, and fortunately
Visual Studio 2005 translated the Euro sign the same way when compiling
resource files (at least for one target locale so far), so it is working.
Mihai N.
2006-11-24 09:56:58 UTC
Permalink
Post by Tony Proctor
This area is a bit of a mire Norman. Many Windows registries seem to equate
"iso-8859-1" (and variations thereof) with "windows 1252". Just look under
HKEY_CLASSES_ROOT\Mime\Database\Codepage\1252.
But iso-8859-1 is not the same as 1252.
It is true that it is considered the same by many ppl/application, but this
is wrong.
Post by Tony Proctor
This has repercussions with things like XMLHTTP since
XML only understands ISO charset names, and not proprietary code pages
An XML processor MUST handle UTF-8 and UTF-16, it MAY understand other
encodings (iso, 1252, MacLatin, etc, get no special treatment).
(see the XML specs at www.w3.org)
So no, XML does not need to understant ISO, and is not forbiden from
understanding proprietary code pages.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Tony Proctor
2006-11-24 10:56:23 UTC
Permalink
Once you're on the Internet, or even just using HTTP, you cannot guarantee
the presence of a Microsoft XML parser. Sure MSXML will honour "windows
1252", etc., but others may not. The XML standard accommodates other
encoding names but doesn't mandate them

Tony Proctor
Post by Mihai N.
Post by Tony Proctor
This area is a bit of a mire Norman. Many Windows registries seem to equate
"iso-8859-1" (and variations thereof) with "windows 1252". Just look under
HKEY_CLASSES_ROOT\Mime\Database\Codepage\1252.
But iso-8859-1 is not the same as 1252.
It is true that it is considered the same by many ppl/application, but this
is wrong.
Post by Tony Proctor
This has repercussions with things like XMLHTTP since
XML only understands ISO charset names, and not proprietary code pages
An XML processor MUST handle UTF-8 and UTF-16, it MAY understand other
encodings (iso, 1252, MacLatin, etc, get no special treatment).
(see the XML specs at www.w3.org)
So no, XML does not need to understant ISO, and is not forbiden from
understanding proprietary code pages.
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Mihai N.
2006-11-24 19:07:37 UTC
Permalink
Post by Tony Proctor
Once you're on the Internet, or even just using HTTP, you cannot guarantee
the presence of a Microsoft XML parser. Sure MSXML will honour "windows
1252", etc., but others may not. The XML standard accommodates other
encoding names but doesn't mandate them
This was exactly the point.
You can only guarantee for UTF-16 and UTF-8, not ISO or anything else
("XML only understands ISO charset names")
--
Mihai Nita [Microsoft MVP, Windows - SDK]
http://www.mihai-nita.net
------------------------------------------
Replace _year_ with _ to get the real email
Norman Diamond
2006-11-20 09:11:31 UTC
Permalink
Post by Serge Wautier
And if you really want an overkill solution, you can install one of the
many Western European keyboards that contain that character. Such as the
Belgian French: The � sign is Ctrl+Alt+E ;-)
Oooh, weirder and weirder. I opened Wordpad and the font was MS P Gothic
and language was Japanese, as normal, the default. I typed Ctrl+Alt+E.
Wordpad displayed the Euro symbol correctly. And Wordpad asserted that the
font was Gulim and the language was Hangul.

In the drop-down list of languages, Hangul wasn't even available before I
typed Ctrl+Alt+E. That makes sense in a way, since Hangul isn't a language.
But Korean wasn't shown in the list either before or after that. Now how
was it determined that the Euro symbol is a Hangul character, only Microsoft
knows.
Norman Diamond
2006-11-20 11:39:39 UTC
Permalink
Post by Norman Diamond
Oooh, weirder and weirder. I opened Wordpad and the font was MS P Gothic
and language was Japanese, as normal, the default. I typed Ctrl+Alt+E.
Wordpad displayed the Euro symbol correctly. And Wordpad asserted that
the font was Gulim and the language was Hangul.
That wasn't weird enough for Weirdpad. Take a look at this:
Loading Image...
Loading...