Closed KHLALA-Gh closed 5 months ago
Well this happening because the book name should be less than 17 characters, and to make sure the name is less than 17 chars we use the len()
function in go. But the problem is that the len()
function returns the number of bytes not the number of runes. So to get the number of runes we can use instead utf8.RuneCountInString(str)
.
You can see https://github.com/golang/go/issues/22127 for more info.
An error shown when creating a new book with characters like "السلام عليكم " or "Привет ребята".
When checking in the app resources directory, i found the book directory created containing all the files. But the book does not appear in my library, which may mean the book is not inserted in the database.