ICommonConfiguration.

StringEncoding Property

Summary

configures the string encoding to be used.

Syntax

IStringEncoding StringEncoding { set; }

Remarks

configures the string encoding to be used.

The string encoding can not be changed in the lifetime of a database file. To set up the database with the correct string encoding, this configuration needs to be set correctly before a database file is created with the first call to Db4objects.Db4o.Db4oFactory.OpenFile(System.String) or Db4objects.Db4o.Db4oFactory.OpenServer(System.String,System.Int32) .

For subsequent open calls, db4o remembers built-in string encodings. If a custom encoding is used (an encoding that is not supplied from within the db4o library), the correct encoding needs to be configured correctly again for all subsequent calls that open database files.

In client-server mode, the server and all clients need to have the same string encoding.

Example:
config.StringEncoding = StringEncodings.Utf8();

Value

Type Description
IStringEncoding

See Also

  • Db4objects.Db4o.Config.Encoding.StringEncodings