Commit a3fa3e57fe819b796161b2314826f208e2ef5482
1 parent
41a915da
Exists in
master
and in
5 other branches
Corrigindo problemas na tradução de caracteres.
Showing
3 changed files
with
13 additions
and
2 deletions
Show diff stats
src/classlib/remote.cc
src/classlib/session.cc
| ... | ... | @@ -347,15 +347,22 @@ |
| 347 | 347 | |
| 348 | 348 | iconv(conv2Host,NULL,NULL,NULL,NULL); // Reset state |
| 349 | 349 | |
| 350 | - if(iconv(conv2Host,&inBuffer,&in,&ptr,&out) != ((size_t) -1)) | |
| 350 | + if(iconv(conv2Host,&inBuffer,&in,&ptr,&out) == ((size_t) -1)) { | |
| 351 | + rc.assign(str); | |
| 352 | + } else { | |
| 351 | 353 | rc.assign(outBuffer); |
| 354 | + } | |
| 352 | 355 | |
| 353 | 356 | free(outBuffer); |
| 357 | + } else { | |
| 358 | + rc.assign(str); | |
| 354 | 359 | } |
| 355 | 360 | #else |
| 356 | - rc = str; | |
| 361 | + rc.assign(str); | |
| 357 | 362 | #endif // HAVE_ICONV |
| 358 | 363 | |
| 364 | + trace("%s(\"%s\")=\"%s\"",__FUNCTION__,str,rc.c_str()); | |
| 365 | + | |
| 359 | 366 | return rc; |
| 360 | 367 | } |
| 361 | 368 | ... | ... |
src/java/getset.cc
| ... | ... | @@ -113,6 +113,8 @@ JNIEXPORT jint JNICALL Java_pw3270_terminal_cmp_1string_1at(JNIEnv *env, jobject |
| 113 | 113 | |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | + trace("cmp_string_at(%d,%d,\"%s\") = %d",(int) row, (int) col, str, (int) rc); | |
| 117 | + | |
| 116 | 118 | env->ReleaseStringUTFChars( j_str, str); |
| 117 | 119 | return rc; |
| 118 | 120 | ... | ... |