[MDEV-21228] Document mariadb-conv Created: 2019-12-05 Updated: 2020-03-04 Resolved: 2020-03-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation |
| Fix Version/s: | 10.5.2 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Anel Husakovic |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||
| Description |
|
Under terms of mariadb-conv is a character set conversion utility similar to iconv or uconv. As of 10.5.1, mariadb-conv understands the following options:
The options Examples:
By default, mariadb-conv exits whenever it encounters any conversion problems, e.g.:
The option -c makes mariadb-conv ignore such errors and use the question mark '?' to replace bytes in bad input sequences, or unconvertable characters. The option --delimiter=... makes mariadb-conv treat the specified characters as delimiters rather than the data to convert, so the input is treated as a combination of:
Using mariadb-conv to list MariaDB data directoryAs a side effect, mariadb-conv can be used to list MariaDB data directories in a human readable form. Suppose you have created the following tables:
The above script makes the server create the following files in the MariaDB data directory:
It's not precisely clear which file store which table, because MariaDB uses a special table-name-to-file-name encoding. This command on Linux (assuming an utf-8 console):
can print the table list in a readable way:
Note, the option --delimiter=".\n" is needed to make mariadb-conv treat the dot character (delimiting the encoded table name from the file extension) and the new line character (delimiting separate lines) as delimiters rather than as the data to convert (otherwise the conversion would fail). Windows users can use the following command to list the data directory in the ANSI text console:
Notе:
|
| Comments |
| Comment by Alexander Barkov [ 2019-12-06 ] |
|
Hi jacob.moorman, wlad, Wlad, can you please provide information how to use mariadb-conv to decode table names with Windows 10 (which now supports utf-8 unlike earlier Windows versions). |
| Comment by Ian Gilfillan [ 2020-02-27 ] |
|
Apologies if this is being actively worked on, I've assigned to me as I'd made a duplicate task and started on it: https://mariadb.com/kb/en/mariadb-conv/ |
| Comment by Anel Husakovic [ 2020-03-04 ] |
|
Pushed with d62766a8905b. |