Unicode strings: Difference between revisions
Content added Content deleted
m (Added Sidef language) |
|||
Line 1,051: | Line 1,051: | ||
[http://seed7.sourceforge.net/libraries/utf16.htm UTF-16] files. |
[http://seed7.sourceforge.net/libraries/utf16.htm UTF-16] files. |
||
Because of UTF-32 there is no distinction between byte and character position. |
Because of UTF-32 there is no distinction between byte and character position. |
||
=={{header|Sidef}}== |
|||
Sidef use UTF-8 encoding for pretty much everything, such as source files, chars, strings, stdout, stderr and stdin. |
|||
<lang ruby># International class; name and street |
|||
class 国際( なまえ, Straße ) { |
|||
# Say who am I! |
|||
method 言え { |
|||
say "I am #{self.なまえ} from #{self.Straße}"; |
|||
} |
|||
} |
|||
# all the people of the world! |
|||
var 民族 = [ |
|||
国際( "高田 Friederich", "台湾" ), |
|||
国際( "Smith Σωκράτης", "Cantù" ), |
|||
国際( "Stanisław Lec", "południow" ), |
|||
]; |
|||
民族.each { |garçon| |
|||
garçon.言え; |
|||
}</lang> |
|||
{{out}} |
|||
<pre> |
|||
I am 高田 Friederich from 台湾 |
|||
I am Smith Σωκράτης from Cantù |
|||
I am Stanisław Lec from południow |
|||
</pre> |
|||
=={{header|Tcl}}== |
=={{header|Tcl}}== |