Reputation: 143
I tested this but it won't work. The foreign characters get lost.
char message [] = "stringtobesendedwithforeigncharacters도쿄";
t = 39;
while(curler < t) {
r = send(sockfd, message, t, 0);
if(r > 0) {
curler += r;
}
}
What's the easiest way to do this?
Upvotes: 0
Views: 151
Reputation: 42093
You have a typo in message
declaration and you assign incorrect size to t
as other guys have already pointed out.
This article will maybe help you: Unicode in C and C++: What You Can Do About It Today
Upvotes: 2
Reputation: 143119
Try
char message[] = "stringtobesendedwithforeigncharacters도쿄";
t = sizeof(message)-1;
for starters.
Upvotes: 2