KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Method to change between UNICODE and Compatibility modes
PRODUCT: 4D | VERSION: 11 | PLATFORM: Mac & Win
Published On: November 12, 2009

When having to work and test between UNICODE mode and Compatibility mode, such as when you are woking on a component that will have to operate in both modes, it is nice to have a utility that will quickly toggle the modes and then restart the database to implement the change. Below is a utility that does just that.


C_LONGINT($Mode_L)

$Mode_L:=Get database parameter(Unicode mode )
SET DATABASE PARAMETER(Unicode mode ;1-$Mode_L)

If ($Mode_L=1)
  ALERT("Database toggled to \"Compatibility Mode\".\r\rThe database will restart.")

Else
  ALERT("Database toggled to \"UNICODE Mode\".\r\rThe database will restart.")
End if

OPEN DATA FILE(Data file)