Talk:Unicode variable names: Difference between revisions

No edit summary
(→‎The wrong triangle: new section)
Line 16:
:::: "You just need to speak the language of the of compiler or interpreter." ... That's a matter of syntax and semantic, and ignores the areas of leniency that languages may offer, including variable and other symbol names. I'm certain that's leveraged around the world; we've had a couple cases where people came to RC, and needed to use translation tools to communicate to us. Their source languages wouldn't have been fully representable in ASCII, and one's native language used a Cyrillic alphabet. I don't know for certain, but I would assume that, in their case, new meaningful symbol names would not be easily and conveniently represented in ASCII. --[[User:Short Circuit|Michael Mol]] 17:59, 7 July 2011 (UTC)
::::What? I don't know about Egyption or Thai, but I do speak Chinese. There are historical (very rare) Chinese glyphs that don't have code points defined in Unicode, and there is the Unihan scheme that some people feel can be improved, but what is this "not sufficiently different from each other to prevent confusion" you are talking about? And even if it were true, whatever it means, how is that worse than not being able to write certain things at all? --[[User:Ledrug|Ledrug]] 00:13, 8 July 2011 (UTC)
 
== The wrong triangle ==
 
This is how I wrote the Ruby code:
 
<lang ruby># -*- coding: us-ascii -*-
STDOUT << "# -*- coding: euc-jp -*-
 
class Numeric
def \xa1\xe5(\xa2\xf4\xa2\xf5\xa2\xf6)
self <= \xa2\xf4\xa2\xf5\xa2\xf6
end
end
 
\xa1\xe7 = Float::INFINITY
\xa1\xde5 = [-5, 5]
p [(\xa1\xde5.first.\xa1\xe5 \xa1\xe7),
(\xa1\xde5.last.\xa1\xe5 \xa1\xe7),
(\xa1\xe7.\xa1\xe5 \xa1\xe7)]
"</lang>
 
I found characters in some [http://www.rikai.com/library/kanjitables/kanji_codes.euc.shtml EUC-JP Kanji Code Table], and wrote the backslash escape sequences. I also found a delta character in the EUC-JP Kanji Code Table, but I confused two different characters.
 
{| class="wikitable"
!| Characters || EUC-JP || Big5 || Unicode
|-
|| &#x25b3; || \xa2\xa4 || \xa1\xb5 || U+25b3
|-
|| &#x0394; || \xa6\xa4 || \xa3\x47 || U+0394
|}
 
I first found \xa2\xa4 U+25b3, and put this one in my program. I know enough of the Greek alphabet to wonder why my Greek delta was not with other Greek letters in the table. So I checked the EUC-JP Kanji Code Table again, and found the uppercase Greek alphabet in a different part of the table. This is when I switched to \xa6\xa4 U+0394. But &#x25b3; U+25b3 and &#x0394; U+0394 look so alike, I still confuse them. --[[User:Kernigh|Kernigh]] 03:00, 8 July 2011 (UTC)
Anonymous user