Mano wrote: >After the internationalization talk got me fired up... >At first I tried printing out a variable with greek text in it >SET FOO="ΛΚΞΔΣΛΦΚ" <-if that doesn't show up in your browser trust me >it >is Greek (iso-8859-7) >WRITE FOO >and I get greek :) >WRITE $ASCII(FOO) >and I get 206 no matter what the first character in FOO is >WRITE $CHAR(210) >gives me a block
How did the Greek characters get entered into email? They are not iso-8859-7 as received. They look like UTF-8 Unicode and they do show up as Greek letters when I select the UTF-8 character encoding from the view menu of my browser. UTF-8 is an 8-bit variable length encoding of the multi-byte unicode characters. Notice that every odd numbered byte has the ascii value 206, the same as in your previous example. In the table below, the 4th column displays the Greek letters from your example above when the page is viewed with character encoding iso-8859-7. The 5th column displays the corresponding unicode entities for the same Greek characters. These appear in Greek even with my normal character encoding of iso-8859-1 (western). s z="ΛΚΞΔΣΛΦΚ" f i=2:2:$l(z) s c=$e(z,i),a=$a(c) w !,i,?3,c,?5,a,?10,$c(a+48),?13,"&#",$s(a>127:768+a,1:a),"; ",c?1U,c?1L,c?1N,c?1P,c?1C,c?1E 2 � 155 � Λ 000011 4 � 154 � Κ 000011 6 � 158 � Ξ 000011 8 � 148 � Δ 000011 10 � 163 � Σ 000101 12 � 155 � Λ 000011 14 � 166 � Φ 000101 16 � 154 � Κ 000011 I don't remember the correct algorithm for converting UTF-8 right now, but the above produced results consistent with the rendering of the characters in Mozilla for Mano's two examples. --------------------------------------- Jim Self Systems Architect, Lead Developer VMTH Computer Services, UC Davis (http://www.vmth.ucdavis.edu/us/jaself) ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click _______________________________________________ Hardhats-members mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hardhats-members
