You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@etch.apache.org by "Thomas Marsh (Created) (JIRA)" <ji...@apache.org> on 2011/09/27 17:18:12 UTC

[jira] [Created] (ETCH-177) Incorrect multibyte character encoding/handling

Incorrect multibyte character encoding/handling
-----------------------------------------------

                 Key: ETCH-177
                 URL: https://issues.apache.org/jira/browse/ETCH-177
             Project: Etch
          Issue Type: Bug
          Components: c-binding
         Environment: Experienced on Linux/ARM
            Reporter: Thomas Marsh
            Priority: Blocker


The Etch C binding relies on the compiler dependent wchar_t throughout to handle multibyte strings. It makes incorrect assumptions about the encoding by relying on sizeof(wchar_t) in etch_encoding_for_wchar(). This limits portability across compilers and results numerous issues throughout the code. Within etch_encoding_transcode_wchar() there is a cast from wchar_t* to char*, which does not work. (I'm not sure how it even works on any environment.) The correct way to handle this is to convert the string with wcstombs().

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira