diff --git a/taglib/toolkit/tstring.cpp b/taglib/toolkit/tstring.cpp
index 75a9833..8ba30d2 100644
--- a/taglib/toolkit/tstring.cpp
+++ b/taglib/toolkit/tstring.cpp
@@ -38,6 +38,7 @@
 #include <iostream>
 #include <cstdio>
 #include <cstring>
+#include <cwchar>
 
 #ifdef HAVE_STD_CODECVT
 # include <codecvt>
@@ -198,9 +199,9 @@ String::String(const std::string &s, Type t)
   : d(new StringPrivate())
 {
   if(t == Latin1)
-    copyFromLatin1(&s[0], s.length());
+    copyFromLatin1(s.data(), s.length());
   else if(t == String::UTF8)
-    copyFromUTF8(&s[0], s.length());
+    copyFromUTF8(s.data(), s.length());
   else {
     debug("String::String() -- A std::string should not contain UTF16.");
   }
