harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Regis Xu (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HARMONY-6037) [classlib][portlib] bug of converting unicode to utf-8 in hyerrorhelpers.c::errorMessage
Date Tue, 09 Dec 2008 03:13:44 GMT

     [ https://issues.apache.org/jira/browse/HARMONY-6037?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Regis Xu updated HARMONY-6037:
------------------------------

    Attachment: HARMONY-6037.diff

Would anyone want to try this?

> [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
>             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.


Mime
View raw message