diff options
author | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 19:58:24 +0200 |
---|---|---|
committer | Matthias Schiffer <matthias@gamezock.de> | 2009-09-27 19:58:24 +0200 |
commit | b40ba0cf91603b695f1f2380cbd39966a458f22f (patch) | |
tree | 1fec48ddc59eb1392fac38495b230e4b2cbf7528 /src/madc.cpp | |
parent | e1d8490f0654a3da0b900407d80d91d8d0da68c8 (diff) | |
download | mad-b40ba0cf91603b695f1f2380cbd39966a458f22f.tar mad-b40ba0cf91603b695f1f2380cbd39966a458f22f.zip |
Use Unicode-aware String class instead of std::string
Diffstat (limited to 'src/madc.cpp')
-rw-r--r-- | src/madc.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/madc.cpp b/src/madc.cpp index eaa1613..88060e9 100644 --- a/src/madc.cpp +++ b/src/madc.cpp @@ -95,20 +95,21 @@ int main(int argc, char *argv[]) { std::cerr << " connected." << std::endl << std::endl; { - std::string username, password; + std::string username; + Core::String password; std::cerr << "Login: " << std::flush; std::getline(std::cin, username); password = Client::PasswordReader::readPassword("Password: "); try { - Client::Authenticators::ChallengeResponseAuthenticator::authenticate(&application, connection, username, password); + Client::Authenticators::ChallengeResponseAuthenticator::authenticate(&application, connection, username.c_str(), password); } catch(Core::Exception e) { if(e.getErrorCode() != Core::Exception::NOT_AVAILABLE) throw e; - Client::Authenticators::PasswordAuthenticator::authenticate(&application, connection, username, password); + Client::Authenticators::PasswordAuthenticator::authenticate(&application, connection, username.c_str(), password); } } @@ -143,7 +144,8 @@ int main(int argc, char *argv[]) { commandParser.requestDisconnect(); } else if(*cmd) { - commandParser.parse(cmd); + // TODO Use locale + commandParser.parse(Core::String::fromUTF8(cmd)); history(hist, &histEv, H_ENTER, cmd); } else continue; |