Replace deprecated from_c_str with from_buf in id

Hello,


The pull request eliminates warnings due to the deprecated usage of `from_c_str` in `id`.

Regards,
Ivan