Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Pascal Delphi Misc > Re: How to repr...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 7 Topic 6050 of 6157
Post > Topic >>

Re: How to represent the letter phi

by "Rudy Velthuis" <newsgroups@[EMAIL PROTECTED] > May 7, 2008 at 12:59 PM

Winbug wrote:

> Hi
> I am going to send the letter phi over a rs232 connection.  The
> problem I have is finding the letter in the ascii system.  According
> to articles on the web, I can get the letter phi by using either
> chr(1000) or chr(618).  

This is not as simple as you think. Note that phi is not part of the
ASCII system at all. It may appear in certain Ansi codepages as one
ofthe charcaters above 127), but it doesn't always. So you'll have to
use one of the forms of Unicode, probably UTF-16 or UTF-8.

Chr(1000) doesn't sound right, since Chr only produces 1-byte
AnsiChars, so the highest value can be 255. So I guess 1000 and 618 are
Unicode code points, and how these are encoded differs on the kind of
encoding you wish. If you use UTF-16, which uses 2 bytes for most
characters, but sometimes pairs of 2-byte characters for the more
unusual ones, you'll havwe to send 2 or 34 bytes over the RS232. If you
use UTF-8, you may have to send even more bytes. I don't know the UTF-8
encoding for phi, but you can find it on the web, I'm sure.

http://unicode.org/faq/utf_bom.html


-- 
Rudy Velthuis        http://rvelthuis.de

"Eternal nothingness is fine if you happen to be dressed for it."
 -- Woody Allen.
 




 7 Posts in Topic:
How to represent the letter phi
Winbug <Roger.Valand@[  2008-05-07 05:24:28 
Re: How to represent the letter phi
Marco van de Voort <ma  2008-05-07 12:30:15 
Re: How to represent the letter phi
"Rudy Velthuis"  2008-05-07 12:59:01 
Re: How to represent the letter phi
Winbug <Roger.Valand@[  2008-05-07 13:47:19 
Re: How to represent the letter phi
"Rudy Velthuis"  2008-05-07 22:26:08 
Re: How to represent the letter phi
"Maarten Wiltink&quo  2008-05-08 00:25:44 
Re: How to represent the letter phi
Hans-Peter Diettrich <  2008-05-08 14:45:51 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Oct 13 11:20:18 CDT 2008.