How do I convert QString to unicode code.I need to support asian language. I am using asian language kepyboard input.

So I have QString and I like to pass as std::string.
SetUserName(std::string);
QString strUser= "UserName";
//I have tried following:-
SetUserName(strUser.toUtf8().data());
I have also tried this:-
Qt Code:
  1. QTextCodec *codec = QTextCodec::codecForName("UTF-8");
  2. QTextCodec::setCodecForCStrings(codec);
To copy to clipboard, switch view to plain text mode 

SetUserName(strUser.Ascii().data());