Jump to content
Developer Wiki and Function Reference Links ×

ASCII question


Recommended Posts

This is just me poking around trying to learn more VS.

I was looking up ASCII values. I always forget that carriage return is chr(13).

I noticed that the extended characters (128-255) on web tables differed from the what vectorworks returned.

The VS Language Guide has a reference to ISO 8859-1. That's yet a third different set of values for 128-255.

I'll attach a examples

Anyone know what's going on?

Thanks

mk

Link to comment
I don't think I'm seeing it on OSX.

Are you saying that Message(chr(176),chr(177)); returns something different from Message(CONCAT(chr(176),chr(177)));?

mk

Yes, I just confirmed it on my old computer where Windows will return a different symbol for the upper 128 symbols when you use a concat function over it. This doesn't appear on OsX.

I wrote this simple script not only to help me find any symbol I need but also shows the difference with using the concat function in the last column.

On OsX both symbol columns are the same.

PROCEDURE ASC;
VAR
BladHd	:HANDLE;
i	:INTEGER;
WsName	:STRING;

BEGIN
WsName:='ASCII';
BladHd:=GetObject(WsName);
IF BladHd = NIL THEN BEGIN
	BladHd:=CreateWS(WsName,256,3);
	SetWsCellFormula(BladHd,1,1,1,1,'ASCII Number');
	SetWsCellFormula(BladHd,1,2,1,2,'ASCII Symbol');		
	SetWsCellFormula(BladHd,1,3,1,3,'ASCII concat(Symbol)');		
END;

FOR i:=1 TO 255 DO BEGIN
	SetWsCellFormula(BladHd,i+1,1,i+1,1,concat(i));
	SetWsCellFormula(BladHd,i+1,2,i+1,2,Chr(i));		
	SetWsCellFormula(BladHd,i+1,3,i+1,3,concat(Chr(i)));
END;

END;
Run(ASC);

Link to comment
  • Vectorworks, Inc Employee

Anything over 127 is questionable about how it will display or processed by Vectorworks.

Typically the Mac extended characters works best.

In general we try to avoid using the extended characters set and often have a test for Mac/Win and use different characters and expose them a plug-in strings.

We avoid using the extended characters set for things like symbol names because they have caused too many problems over the years and often display very differently depending on the font being used.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...