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
| @@ -984,6 +984,8 @@ | @@ -984,6 +984,8 @@ | ||
| 984 | 984 | ||
| 985 | int cmp_text_at(int row, int col, const char *text) | 985 | int cmp_text_at(int row, int col, const char *text) |
| 986 | { | 986 | { |
| 987 | + debug("%s(%d,%d,\"%s\")",__FUNCTION__,row,col,text); | ||
| 988 | + | ||
| 987 | #if defined(WIN32) | 989 | #if defined(WIN32) |
| 988 | 990 | ||
| 989 | struct hllapi_packet_text_at * query; | 991 | struct hllapi_packet_text_at * query; |
src/classlib/session.cc
| @@ -347,15 +347,22 @@ | @@ -347,15 +347,22 @@ | ||
| 347 | 347 | ||
| 348 | iconv(conv2Host,NULL,NULL,NULL,NULL); // Reset state | 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 | rc.assign(outBuffer); | 353 | rc.assign(outBuffer); |
| 354 | + } | ||
| 352 | 355 | ||
| 353 | free(outBuffer); | 356 | free(outBuffer); |
| 357 | + } else { | ||
| 358 | + rc.assign(str); | ||
| 354 | } | 359 | } |
| 355 | #else | 360 | #else |
| 356 | - rc = str; | 361 | + rc.assign(str); |
| 357 | #endif // HAVE_ICONV | 362 | #endif // HAVE_ICONV |
| 358 | 363 | ||
| 364 | + trace("%s(\"%s\")=\"%s\"",__FUNCTION__,str,rc.c_str()); | ||
| 365 | + | ||
| 359 | return rc; | 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,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 | env->ReleaseStringUTFChars( j_str, str); | 118 | env->ReleaseStringUTFChars( j_str, str); |
| 117 | return rc; | 119 | return rc; |
| 118 | 120 |