4D v14.3

Win to Mac

Home

 
4D v14.3
Win to Mac

Win to Mac 


 

Win to Mac ( text ) -> Function result 
Parameter Type   Description
text  String in Text expressed using Windows ANSI map
Function result  String in Text expressed using Macintosh ASCII map

This command only works when the database is executed in ASCII compatibility mode. In Unicode mode, it does nothing (the text string is returned without modification). Beginning with version 11 of 4D, this command is thus obsolete and its use is no longer recommended. It is recommended to convert character strings using the Convert to text or CONVERT FROM TEXT commands.

The Win to Mac command returns text expressed using the Mac OS ASCII map that is equivalent to the text you pass in Text, which is expressed using the Windows ANSI map.

This command expects a text parameter that is expressed using the Windows ANSI map.

Generally, when running on Windows, you do not need to use this command to convert ASCII codes. In ASCII compatibility mode (non-Unicode), when you copy or paste text between 4D and Windows or when you import or export data, 4D automatically performs these conversions. However, when you use disk read/write commands such as SEND PACKET or RECEIVE PACKET, you need to explicitly perform ASCII conversions. This is the main purpose of the Win to Mac command.

Within 4D, all the text values, fields, or variables that you have not yet converted to another ASCII map are Mac OS-encoded on both Macintosh and Windows. For more information, see the section ASCII Codes.

Note: This command replaces the CRLF (Carriage return + Line feed, character codes 13 and 10) characters with the CR (Carriage return) characters. Consequently, the text returned may be shorter than the original text.

Example  

When you read characters from a Windows document using RECEIVE PACKET, if you do not use an input ASCII map for filtering characters from Windows to Mac OS (see USE CHARACTER SET), you need to convert the text from Windows to Mac OS yourself. You can do it this way:

  ` ...
 RECEIVE PACKET($vhDocRef;vtSomeText;16*1024)
 vtSomeText:=Win to Mac(vtSomeText)
  ` ...

 
PROPERTIES 

Product: 4D
Theme: String
Number: 464

This command is deprecated and should not be used anymoreThe Unicode mode affects this command

 
HISTORY 

Modified: 4D v11 SQL

 
SEE ALSO 

ASCII Codes
Mac to Win
RECEIVE PACKET
USE CHARACTER SET

 
ARTICLE USAGE

4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v11 SQL Release 6)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)