I mean that which type of encoding does dbm use in coding string to bytes? And how to convert it back to a string?
Asked
Active
Viewed 304 times
0
-
I mean like utf-8, aiise etc.. – LoneWolf Oct 26 '18 at 10:14
1 Answers
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
-
-
dbm doesn't perform any encryption, it just encodes Strings into bytes using default system encoding (where every system has default type of encoding, it is about how to convert bytes to string and vice versa), please follow the link in the answer in order to know more about it – peter bence Oct 26 '18 at 10:22
-
The commands you wrote in your answer doesn't check; they just raise that old ms-dos error – LoneWolf Oct 26 '18 at 10:26
-
-