Woodwing Developer created FLEX-33522: -----------------------------------------
Summary: 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 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