You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/04/25 11:58:15 UTC

[jira] [Commented] (FLEX-33522) Cyrillic text not supported for Windows in native extension

    [ https://issues.apache.org/jira/browse/FLEX-33522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13641610#comment-13641610 ] 

Justin Mclean commented on FLEX-33522:
--------------------------------------

Likely a AIR issue not an Apache Flex issue - but not 100% sure. You may have to raise issue with Adobe not Apache.
                
> Cyrillic text not supported for Windows in native extension
> -----------------------------------------------------------
>
>                 Key: FLEX-33522
>                 URL: https://issues.apache.org/jira/browse/FLEX-33522
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.9.0
>         Environment: Windows / Air
>            Reporter: Woodwing Developer
>            Priority: Blocker
>              Labels: air, cyrillic, extension, native, windows
>
> Pre-requisites:
> - a simple native extension that opens a file. The file path is send by the client Air app to the native extension.
> - windows environment with cyrillic text (e.g. russian)
> - a file in a folder with cyrillic name is it's path. (e.g. "Сергей Голиков")
> The native extension uses this code to parse the path:
> C code:
> --- START CODE ----
> FILE * hd_src = NULL;
> const uint8_t* str	= 0;
> uint32_t len		= -1;
> FREObject filename			= argv[1 ];
> FREGetObjectAsUTF8( filename, &len, &str );
> wchar_t * filepath = (wchar_t *)str;
> fopen_s(&hd_src, transferObject->filePath.c_str(), "rb");
> if  (hd_src == NULL) {
>     _wfopen_s(&hd_src,filePath, L"rb, ccs=UTF-8" );
> }
> if  (hd_src == NULL) {
> 	_wfopen_s(&hd_src,filePath, L"rb, ccs=UNICODE" );
> }
> if  (hd_src == NULL) {
> 	_wfopen_s(&hd_src,filePath, L"rb, ccs=UTF-16LE" );
> }
> ---- END CODE ---
> hd_src is always null. If you save the parsed file path to a txt file, the characters are shown correctly. If you open a file without cyrillic text it opens correctly.
> In mac os, because of the Unix encoding the file opens correctly.
> Expected behavior is that the file also gets open in windows environment.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira