xsharp.eu • Use of Attributes - Page 3
Page 3 of 3

Use of Attributes

Posted: Wed Mar 22, 2017 9:41 am
by FFF
Frank,
to cite from your link:
..."You can work with a T:System.String object in its entirety instead of working with its individual characters to represent and analyze linguistic content."...

IMHO the "char" presents more problems than it's worth... It might have hold some usecase when talking only ASCII, plus severe memory restrictions - remember, when Apple II could keep a whole office app in 64kB ;) - but today?

Use of Attributes

Posted: Wed Mar 22, 2017 9:51 am
by robert
Frank,
Frank Maraite wrote:Hi all,
after reading this completly (but not fully understand the consequences)
https://msdn.microsoft.com/de-de/librar ... .110).aspx
it seem that 'Ä' and "Ä" (german umlaut, but other characters too) is not always the same.
"Ä" maybe one chars or two chars.
Frank, a little bit confused now.
Welcome in the Unicode nightmare. This has nothing to do with rational solutions but with language polictics...

The important thing is that the Unicode Standard identifies each Unicode character with a unique 21-bit scalar number called a code point. Char has only 16 bits, so is not sufficient to represent all Unicode chars. And Unicode keeps on adding characters, such as the emojis: http://www.unicode.org/emoji/charts/emoji-released.html

I have no idea why they have 2 representations of the same thing though.


Robert