HDF5.jl supports writing strings. For some reason, datatype(String) doesn't work, but datatype("This is a string") works. So just pass the string data, and not the string type, to datatype.
Even simpler, just do write(g, "/dane", "my string"), for example.