diff --git a/src/MAT_HDF5.jl b/src/MAT_HDF5.jl index 98ca460..952152c 100644 --- a/src/MAT_HDF5.jl +++ b/src/MAT_HDF5.jl @@ -596,9 +596,9 @@ function read(obj::HDF5Object, ::Type{MatlabString}) data = reshape(data, sz[2:end]) end if ndims(data) == 1 - return convert(String, convert(Vector{Char}, data)) + return String(convert(Vector{Char}, data)) elseif ndims(data) == 2 - return datap = String[rstrip(convert(String, convert(Vector{Char}, vec(data[i, :])))) for i = 1:size(data, 1)] + return datap = String[rstrip(String(convert(Vector{Char}, vec(data[i, :])))) for i = 1:size(data, 1)] else return data end