0

I mean that which type of encoding does dbm use in coding string to bytes? And how to convert it back to a string?

LoneWolf
  • 339
  • 4
  • 17

1 Answers1

1

I guess that you mean encoding. So, a **dbm** database can only store strings, both as keys and values. In fact, it only stores bytes, and by default uses your default encoding if you give it Unicode strings.

You can test your system default encoding through:

For UNIX-based:

echo $LC_CTYPE

or

echo $LANG

For Windows using PowerShell:

[System.Text.Encoding]::Default
peter bence
  • 782
  • 3
  • 14
  • 34