comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: The letter Sharp S and the English language
Date: Mon, 25 Mar 2013 18:08:06 -0500
Date: 2013-03-25T18:08:06-05:00	[thread overview]
Message-ID: <kiqlcs$a5i$1@munin.nbi.dk> (raw)
In-Reply-To: 5150a9f2$0$6567$9b4e6d93@newsspool4.arcor-online.net

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1427 bytes --]

"Georg Bauhaus" <rm.dash-bauhaus@futureapps.de> wrote in message 
news:5150a9f2$0$6567$9b4e6d93@newsspool4.arcor-online.net...
...
> Unicode's CaseFolding.txt, if applicable, has two lines pertaining
> to the matter,
>
> 1E9E; F; 0073 0073; # LATIN CAPITAL LETTER SHARP S
> 1E9E; S; 00DF; # LATIN CAPITAL LETTER SHARP S
>
> So I'm wondering if Simple Case Mapping might mean that
>
>  To_Upper (Wide_Character'('ß'))
>
> should return Wide_Character'Val (16#1E9E#) in Ada 2012.

No. You are looking at the wrong Unicode table (case folding is used for 
case-insensitive comparisons, you want case mapping -- these get different 
results. Besides, case folding is a mapping to *lower* case.) If you were 
looking at the right table, the 'S' line would be the important one, and in 
this case, the mapping is to "00DF", which definitely is not "1E9E". ;-)

It's possible that the upper case mapping does use that character, but case 
mapping is implementation-defined in the respect that we don't require the 
use of any particular character set standard so long as it is at least as 
new as 10646:2003. So if a compiler used the 2003 definition, then it would 
be impossible to have the result you want.

Moral: if you care about anything that's changed in character set mappings 
since 10646:2003, then you have to write your own conversions in order to be 
sure that they happen.

                                   Randy.




  reply	other threads:[~2013-03-25 23:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-23 21:22 The letter Sharp S and the English language Georg Bauhaus
2013-03-25 15:23 ` Adam Beneschan
2013-03-25 19:48   ` Georg Bauhaus
2013-03-25 23:08     ` Randy Brukardt [this message]
2013-03-31 19:47     ` Paul Sture
2013-03-25 21:55   ` Georg Bauhaus
2013-03-25 16:15 ` Eryndlia Mavourneen
2013-03-25 19:42   ` Georg Bauhaus
2013-03-25 20:12     ` Eryndlia Mavourneen
2013-03-25 22:09       ` Adam Beneschan
2013-03-25 23:12     ` Randy Brukardt
2013-03-26 13:13       ` Eryndlia Mavourneen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox