[ https://issues.apache.org/jira/browse/HARMONY-6037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tim Ellison reassigned HARMONY-6037:
------------------------------------
Assignee: Tim Ellison
> [classlib][portlib] bug of converting unicode to utf-8 in hyerrorhelpers.c::errorMessage
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-6037
> URL: https://issues.apache.org/jira/browse/HARMONY-6037
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Regis Xu
> Assignee: Tim Ellison
> Fix For: 5.0M9
>
> Attachments: HARMONY-6037.diff
>
>
> after applying following patch:
> Index: modules/luni/src/main/native/luni/shared/OSFileSystem.c
> =====================================================================
> --- modules/luni/src/main/native/luni/shared/OSFileSystem.c
> +++ modules/luni/src/main/native/luni/shared/OSFileSystem.c
> @@ -240,6 +240,9 @@ JNIEXPORT jlong JNICALL Java_org_apache_harmony_luni_platform_OSFileSystem_openI
> ioh_convertToPlatform (pathCopy);
>
> portFD = hyfile_open (pathCopy, flags, mode);
> + if (portFD < 0) {
> + throwNewExceptionByName(env, "java/io/FileNotFoundException", hyfile_error_message());
> + }
> return (jlong)portFD;
> }
>
> and run the test in Harmony-6034, I got unrecognized characters, it should be Chinese
characters
> I fond that, in hyerrorhelpers.c::errorMessage, need to convert unicode got from Windows
to utf-8 for java use.
> When convert to multi-bytes ( > 0x80), the order of bytes is totally reversed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|